Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
August 2008


all groups > sql server programming > september 2004 > threads for monday september 27

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

How to implement cyclic transaction log on SQL Server?
Posted by moonriver at 9/27/2004 11:38:11 PM
Is there anybody knowing how to implement cyclic transcation log on MS SQL Server 2000, similar to Oracle? ...more >>

BCP Problem
Posted by Anand at 9/27/2004 11:09:03 PM
Hi All, I need to write a bcp program using a cmd file to export the data from a table (using select query) to .dat file. Problem: 1. The problem is the destination file name is stored in a table. How can i write a bcp program in this case? Something like: BCP "select * from pubs.....more >>

bulk copy api on unix
Posted by Vivek T S at 9/27/2004 9:55:01 PM
hi, i would like to know if the bulk copy api for sql server is supported on unix by any odbc vendors. -- Vivek T S Member Technical Staff (Inucom)...more >>

Using the time portion of start_date & end_date timestamp for calc
Posted by bforeman44 at 9/27/2004 8:13:02 PM
what is the best want to get the time portion of a timestamp, both start and end, for calculations. WE are figuring the elapse time in minutes for an outage on a specific service and would a like a solution. Thank you Boyd Foreman, ...more >>

Openrowset with text file data source
Posted by Gerald Hopkins at 9/27/2004 7:01:27 PM
Can anyone give me an example of using OpenRowset with a text file as the data source? I can't seem to get the arguments right. Thanks, Gerald *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

ASP & SPROC return values
Posted by gdp at 9/27/2004 6:45:39 PM
hi...posted this a while ago and someone kindly gave me some help...still can't get it going though the procedure is as below CREATE PROCEDURE dbo.populate_MAIN_visitors @IP nvarchar(20), @passScreen int AS declare @ident int declare @guid nvarchar(45) SET NOCOUNT ON insert into...more >>

login expiration
Posted by gEEnesis at 9/27/2004 5:25:03 PM
How can I obtain the expiration date of logins for the users of sql? is there any stored procedure, or what sys-table stores that?...more >>

Trigger
Posted by Sridhar K at 9/27/2004 4:14:25 PM
Dear All, When a trigger executed by more then one client at a same time on the internet. My asp pages are getting "timed out" If anybody can give a solution. Yours Sridhar K Chennai - india. ...more >>



(OT) ? news.microsoft.com
Posted by Dan at 9/27/2004 3:55:22 PM
I can't use my news reader anymore, it's timing out, I can't ping the news server, I wonder if someone else is having similar trouble or is it something isolated to my network...? I realize the news server may not respond to ICMP.. H:\>ping news.microsoft.com Pinging msnews.microsoft.c...more >>

Insert and Update Question for Project
Posted by Lontae Jones at 9/27/2004 3:35:04 PM
Hello, I have a table called Agent and I have a table called AgentP. I want insert data from AgentP into Agent if the values in the Agent table dont exist and if they do exist in Agent only provide an update. What would be the best method for this. This will be a weekly scheduled event. ...more >>

All rows one by one
Posted by Johny at 9/27/2004 3:26:57 PM
I would like to use SQL query to get all rows one by one. For example: Select a,b from table1 While (I don't know which condition) Do something with row Next row Can somebody help me? ...more >>

Convert integer to date type
Posted by JSmith at 9/27/2004 2:52:08 PM
Hi group, How can I convert an integer (used as date - ISO format) to a regular format of dd/mm/yy ? Thanks, Smith ...more >>

maybe I need a subquery?
Posted by mgm at 9/27/2004 2:43:02 PM
This is a query I have written that works, it grabs a number of users for each org that has more than 3 users, but now I want the names and it doesn't work... but it doesn't give an error, just no results. So I don't know what i'm doing wrong... this works: Select o.Name as 'Organization ...more >>

sp_start_job
Posted by simon at 9/27/2004 2:32:38 PM
If I would like to execute the job from query analyzer: EXEC sp_start_job @job_name = 'prenosZaCPO' I get an error message: Server: Msg 2812, Level 16, State 62, Line 3 Could not find stored procedure 'sp_start_job'. Why? The 'sp_start_job' exists in extended SP in master db. If I...more >>

Save as in SQL Server(Backup - Restore)
Posted by Lars Grøtteland at 9/27/2004 2:22:05 PM
Trying to have a save as in my application. BACKUP DATABASE abw_SWBS_200k TO DISK = 'C:\Program Files\ShipWgt\AsBuilt\Temp.BAK' RESTORE FILELISTONLY FROM DISK = 'C:\Program Files\ShipWgt\AsBuilt\Temp.BAK' RESTORE DATABASE abw_TEMP_03 FROM DISK = 'C:\Program Files\ShipWgt\AsBuilt\Temp.BAK...more >>

sp_tableoption 'MyTable2','text in row','5000'
Posted by Leila at 9/27/2004 2:19:40 PM
Hi, I have a table with some varchar fields and a picture field of type image. I created the second table exactly similar to first table but enabled 'text in row' option: sp_tableoption 'MyTable2','text in row','5000' Then inserted all of records from MyTable1 into MyTable2. All of pictures...more >>

Prevent import of duplicate primary keys
Posted by DLS at 9/27/2004 2:17:03 PM
I'm trying to consolidate data from several organizations that use a clientID. I want a client table with unique clientIDs; other tables can contain information related to the clientID relative to the organization. Because other client information in the client table can be entered different...more >>

Restoring DTS structures file
Posted by Patrick at 9/27/2004 1:56:33 PM
Hi freinds, I have couple of DTS structured file backup. I need to retore them. !!! How should I do it ? Thanks in advance, Pat ...more >>

Save a structure's instance to a Database
Posted by Peter at 9/27/2004 1:48:51 PM
I have defined a complex structure with vb.net. One instance of it will be about 32KB. Is it possible to save it to a SQL Server database and how to do it? Thanks in advance. Peter ...more >>

Getting Result into variable with EXECUTE
Posted by Joachim Hofmann at 9/27/2004 1:46:34 PM
Hello, I want to create a sp, which - receives an parameter (a comma separated list to be processed by 'IN (...)') - and *fills a variable* with the result of the statement. I need the variable content for further processing. I don't know how to fill my variable 'Sumqty' in this test exam...more >>

problem :Operation must use an updateable query?
Posted by Raed Sawalha at 9/27/2004 1:31:13 PM
I have stored procedure doing this INSERT INTO Customer ( Firstname, Middlename, Lastname, Address, = ContactNumber,Email, Age, Sex, Education, Profession, Income, = ReferenceNumber, Type, IP ) VALUES ([p_Firstname], [p_Middlename], [p_Lastname], [p_Address], = [p_ContactNumber], [p_Email], [...more >>

default path for input/output using isql/osql/isqlw
Posted by Tracey at 9/27/2004 1:29:02 PM
Is there a way to not specify a path for output/input in isql, yet still have the input/output in a specific place? I have found that unless specified the output file goes in various locations if the path is not specified. I would like the files to go to mssql\80 \tools\scripts, though ...more >>

could not connect to SMTP server from sql server using JMail, xp_smtp_sendmail or sp_send_cdosysmail
Posted by pras_punjabi NO[at]SPAM yahoo.com at 9/27/2004 1:09:07 PM
I am trying to send an email message from sql server using the JMail component from dimac.net. I was able to use the stored procudure sp_send_mail from the Jmail usage examples successfully using sql server installed on the development machine and a smtp server. If I use another sql server insta...more >>

Maths Formula Question
Posted by Ian at 9/27/2004 12:23:12 PM
Hi All I am having a problem writing a formula. What I need is a formula that can insert a group of numbers of any size from say 3000 to 1 between any two whole numbers. For example between 12 and 13. I have a table with records. I call theses records Instructions. These Instructions are...more >>

Call-Level Interface (CLI)
Posted by ezelasky NO[at]SPAM hotmail.com at 9/27/2004 12:03:13 PM
I have just read about the Call-level interface, a library of DBMS functions that can be called by an application program. Where can I read more about the CLI function, Google & MSDN searches didn't yield much and no examples etc. Does any one actually program to this to facilitate data transf...more >>

Search Newsgroup
Posted by Mark at 9/27/2004 11:47:24 AM
Hi, Is there anyway to search on a sqlprogramming newsgroup before posting a new one here. I just wanna make sure if someone has already asked a question fitting my situation. If so, I would prefer to go to those recommendations first than putting a new post and wasting guru's time....more >>

Help! Yukon CLR Storeprocedure to access Ole datasource, how?
Posted by Bing Lee at 9/27/2004 11:31:55 AM
I tried to write a CLR storeprocedure using C# in Yukon to access an Oracle database. My previous database components cannot be used because when I add them as reference in Visual Studio 2005, the IDE prompts me that "SQL server projects can reference only other SQL Server projects." Whe...more >>

Column Update
Posted by Mark Eslinger at 9/27/2004 11:23:44 AM
I have a table with the columns Amount and Canceled. I need to have an automatic update occur so that when the Canceled column equals 'Y' the Amount column = '0'. How can I do this. Much thanks......more >>

Composite Index Behavior
Posted by Mike Labosh at 9/27/2004 11:20:38 AM
Phrasing order of joins, searches and sorts. As I understand it, for a composite index to be useful, a query should refer to the columns in the same order as they are listed in the index? I played with this in QA with execution plans on, and I think I am correct. Can someone confirm this? ...more >>

how to process the results of a stored procedure inside a strored procedure
Posted by Arun at 9/27/2004 11:19:09 AM
Hi, I have to call a couple of system stored procedures and process the results returned, inside my custom stored procedure. Can anybody tell me how do I retrieve the results of a stored procedure and work on them inside another stored procedure? thanks, Arun ...more >>

Simple dates questions
Posted by Mark at 9/27/2004 10:54:17 AM
I have some dates which visual basic writes to the database in dd/mm/yyyy format. They don't need a timestamp I have a routine in SQL server that checks if the date stored for a record matches getdate() in transact sql However because getdate() also contains a time stamp then even if the...more >>

Quick, simple question
Posted by John at 9/27/2004 10:51:51 AM
Hey all, This is something simple which I can't seem to easily determine. Let's say I have a field and I want to strip off the first 4 characters, leaving just the remaining, varying amount. What do I use? example: raw_data = "jimb99999" finished_data = "99999" Make sense? Thanks very ...more >>

SQL Objects Owner
Posted by Mark at 9/27/2004 10:48:47 AM
I have to authorize people in the db_owner group or some other group (ddladmin etc..) where they should be able to create tables. Problem is when they create table using Query Analyzer, they can mention owner as create table dbo.tablea and the table is owned by dbo. When they user EM to c...more >>

Bulk Insert format file
Posted by daleap at 9/27/2004 10:43:06 AM
I can't seem to find the correct FIELDTERMINATOR and ROWTERMINATOR values. If I use this format file I can successfully use the bulk insert command but I'd prefer to not use a format file. 8.0 2 1 SQLCHAR 0 500 "\"," 1 Subject SQL_Latin1...more >>

VB6/ADO: Creating primary keys
Posted by martin weinberger at 9/27/2004 9:55:44 AM
Hi all, I've narrowed down my problem to a key issue. If I don't create a key, then ADO is happy. If I do, then I know get a complaint. I've whipped up the code fragment below to illustrate my problem. I'm using ADO v2.8, although v2.7 has the same problem. Dim dbtblSQL as New ADOX.Table ...more >>

Customized IIf procedure in SQL Server
Posted by fpvt2 NO[at]SPAM yahoo.com at 9/27/2004 9:39:04 AM
We need to move our Access db to SQL Server. Our Access database have many SQL Queries with Visual Basic function/procedures calls, like IIf. Instead of totaly rewrite thousands of SQL Statements that uses VB function calls which isn't supported in SQL Server (like IIf), we'd like to extend SQ...more >>

Snapshot Relational Data into New Tables
Posted by Raterus at 9/27/2004 9:38:14 AM
Hi, I have a process I've created that uses about 15 relational tables, = The end result is a handful of records from one of these tables. This = table provides a primary key base that the rest of these tables can link = to through relationships. My requirements are than I need to copy a = sna...more >>

Is sql server as good as access 97?
Posted by Michael Culley at 9/27/2004 9:05:47 AM
I'm converting an app using vb6 and access97 over to use sqlserver. One thing access can do that sql doesn't seem to be able to do is create a view with parameters. The help says I can use something like "select * from SomeTable Where SomeField = ?" or "where somefield = %some value%". I can do ...more >>

Repost - SP Performance Enhancement
Posted by Andre at 9/27/2004 9:05:04 AM
Hi all, I have this stored procedure that is used to return recordsets for a directory of doctors on a website. I was wondering if anyone could look and give me some suggestions on how I could rewrite it or enhance it to perform better. Here is the code. CREATE proc usp_GetProvidersByS...more >>

conversion question
Posted by John at 9/27/2004 8:45:05 AM
I am trying to convert a column of type varchar with a length of 8 characters to a column of datatype datetime. I keep getting the error "syntax error converting datetime from character string." I can't figure out why I am getting this error. I even converted all of the char values to ccyym...more >>

Set end ponits to max hours of date
Posted by Sally at 9/27/2004 8:35:09 AM
Howdy, For instance, I have a date '2004-09-27', I would like to convert it to max hours second format like this '2004-09-27 23:59:59.999'. Any help will be appreciated. THX...more >>

How to Import Data from Email?
Posted by JDP NO[at]SPAM Work at 9/27/2004 7:27:19 AM
Can I extract from an email, finding in the body the date of the data feed, rename the CSV attachment as I save it to a folder then run the DTS pkg to import the attachment? I won't mind manually managing the process until I have confidence in it's automation, however I'd like to eventually be...more >>

Which type of join?
Posted by Kendra at 9/27/2004 7:15:03 AM
Hello All, I have read through the different types of joins but I'm not getting the results that I would like. I need to join 2 tables to create a third table. I actually received help from this site to do it. select M.MemberID_,M.FullName_,M.EmailAddr_,F.DeliveryState,F.DeliveryCount...more >>

SQL Trigger Assistance
Posted by MrMike at 9/27/2004 7:08:44 AM
I need assistance with creating an SQL trigger. My SQL database has 2 tables: tblLogs & tblBundles. Simplistically speaking, tblLogs is a "master" table and tblBundles is a "child" table because tblBundles contains detail records for records in tblLogs. Both of these tables have a field...more >>

Moving row data to columns
Posted by Offeral at 9/27/2004 7:01:04 AM
I have a result table set up as follows: a a1 a a2 b b1 b b2 b b3 I've tried, but have failed to come up with the code to take this result set and turn it into another set with the following setup: a a1 a2 a3 a4 b b1 b2 b3 ...more >>

Help w/Self-Join Hierarchy Query
Posted by Frank Romano at 9/27/2004 6:34:54 AM
I am completely lost trying to create a query that returns an ADO recordset for a threaded message display that will be displayed in a classic ASP web page. The table looks like this: CREATE TABLE [dbo].[cust_messages] ( [cust_msg_unique_id] [int] IDENTITY (1, 1) NOT NULL , [cust_system_...more >>

ORDER BY Column WITH Value = 2456 as LAST
Posted by dev NO[at]SPAM thehexx.com at 9/27/2004 4:47:07 AM
I need to order a recordset by a Column that is of type INT. I would like to force it to return the recordset with a particular value last. Something along the Lines of SELECT ID, Name, Age FROM TABLE ORDER BY AGE ( WITH Age = 17 LAST )<- Psuedo Code here but this is what I require is...more >>

Referencing other tables
Posted by Paul in Harrow at 9/27/2004 3:11:01 AM
Hi there I have a table "ContactDetails" that includes the following fields: CD_LogInName Varchar (35) Primary Key, CD_FirstName Varchar (15), CD_LastName Varchar (15) etc etc I am now creating another table "Alldetails" with the field AD_LogInName Varchar (35) [this will be part of the pr...more >>

check for duplicate data using stored procedure
Posted by tchangmian NO[at]SPAM yahoo.com.sg at 9/27/2004 2:38:12 AM
i would like to check for duplicate data in a field called catalog_code, if i found got duplicate data,then the table (rd_awards) will not be dropped, but if i found that dun have duplicate data in the catalog_code field, the table will be dropped. Since i want to do this in stored procedure, do...more >>

Create table
Posted by T.H.M at 9/27/2004 2:15:29 AM
Hello I created table that one of the column is smalldatetime type. create table BF(hashStr varchar(32) Primary key, fName varchar(36), hashD smalldatetime) My problem is that the smalldatetime is in 'mm/dd/yyyy hh:mi:ss(24h)' format but I neet it in 'dd/mm/yyyy hh:...more >>

Tree view Query
Posted by babz at 9/27/2004 2:09:04 AM
Hi I have table structure like Create table tblChain (WFId int Identity(1,1) Primary key, WFDesc Varchar(50), ParentId Int references tblChain(WFID)) I have data as follows WFID WFDesc ParentId 1 Parent1 Null 2 Child1 1 3 Child2 1 4 Child11 2 5 Child21 3 6 Parent2 Nu...more >>

two log file to single log file
Posted by Leila at 9/27/2004 1:13:50 AM
Hi, My database was created with 2 log files. Is it possible to ignore the logged information and have just one log file from now one? Thanks, Leila ...more >>

Filegroups and BLOBs
Posted by Leila at 9/27/2004 12:05:42 AM
Hi, As books online mentions, BLOBs are not stored in row by default but they are out of the row. I'm wondered that if they are separate from searchable data(rows), how placing them into other filegroup can help performance? Basically does it? For example: CREATE TABLE Table1 ( C1 int, C2 ...more >>


DevelopmentNow Blog