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
all groups > sql server programming > october 2003 > threads for sunday october 19

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 31

Remove carriage returns from varchar
Posted by Chris at 10/19/2003 11:55:56 PM
how do I remove (find and replace) carriage returns from strings. Is there a simple way to do this using transact functions?...more >>


Selecting 1st record
Posted by David C at 10/19/2003 11:16:01 PM
Hi Everyone, Question: I have two tables that I have joined, it is a one to many join. My problem is I need to only capture the 1st record of each line, I have 5 million records so I don't want to do it manually! e.g. Sydney Record1 -- Need this one Sydney Record2 Sydney Record3 ...more >>

executing a dts package --newbi
Posted by pat at 10/19/2003 10:36:04 PM
New to dts. How do you call a dts package using sql query analyzer. I wrote a simple dts package. Now would like to execute it in query analyzer. Can't find a sample code to follow. Normally I use bulk insert but this file has something weird about it and would not load via bulk insert but I co...more >>

SQL Triggers, Looping, and Stored Procedure...
Posted by Kevin Buchanan at 10/19/2003 9:06:04 PM
Scenario: Our ISA server posts the WebProxy Logs into SQL. Each record is timestamp'ed. I want to evaluate the difference (in seconds) between sequential events. I have been using a VBScript to read from a dataset and create a new table that summarizs the activity from our ISA WebProxy. It work...more >>

invisible backups
Posted by Kenneth R. Moore at 10/19/2003 8:57:48 PM
Hi All, I have a SQL Server 2000 database and backup set at work that I've duplicated at home. My problem is with the backup set which contains a number of database backups. When I attempt to do a restore, I don't see any of the backups I made at work. I am currently looking thru BOL and ...more >>

Using DATEPART
Posted by Arpan at 10/19/2003 8:49:58 PM
PRINT DATEPART(wk,DATEPART(yy,GETDATE()) + '0104') PRINT DATEPART(wk,'2107') The first statement generates the output 41 but the output of the second statement is 1!! Why are the 2 statements generating 2 different outputs? Thanks, Arpan ...more >>

SQL query help...
Posted by omavlana NO[at]SPAM rediffmail.com at 10/19/2003 8:16:05 PM
Hi, I have writtem the query.... select sum( case when shmsharect >= 10000 then 1 else 0 end ) as cnt_big , sum( case when shmsharect >= 10000 then shmsharect else 0 end ) as shares_big , sum( case when shmsharect < 10000 then 1 else 0 end ) as cnt_small , sum( case when sh...more >>

if statement changes @@error?
Posted by konsu at 10/19/2003 7:47:00 PM
hello, if @@error is not zero, why does the statement if @@error <> 0 set @err = @@error results in @err variable being set to zero, whereas set @err = case when @@error <> 0 then @@error else @err end sets the @err variable correctly? another way to phrase the question: is it...more >>



Group by date help
Posted by Hassan at 10/19/2003 6:11:21 PM
I have a query that I would like to group by month and year to get a total count TableA Count Insertdate 1 2003-09-10 11:00:00.000 2 2003-09-15 11:00:00.000 3 2003-09-19 11:00:00.000 1 2003-10-10 11:00:00.000 1 2003-10-11 11:00:00.000 3 ...more >>

Connection Pooling
Posted by Tom Murdock at 10/19/2003 5:18:26 PM
I have a VB.NET app which accesses several SQL Server desktop databases using SQLDMO. I need to give the user the ability to change the active database. To do this, I must detach and attach a database using SQLDMO. I cannot detach while a connection is open. Pooling "holds" the connect...more >>

Help with Select max
Posted by John Doe at 10/19/2003 3:36:30 PM
I have the following two tables foo1 pk1 id1 id2 ----- ------ ------ 1 3 4 2 3 5 3 4 1 4 5 3 5 6 0 Id1 and Id2 are actually combined so that they are one entity. foo2 fk1 status name ------ -------- -------- 1 ...more >>

Year
Posted by Newbie79 at 10/19/2003 2:48:14 PM
How can I create a stored procedure that will show the last 5 years including the current year?? Thanks in advance...more >>

RE:Store procedure
Posted by news.microsoft.com at 10/19/2003 12:53:56 PM
Hi: I am new in store procedure coding. I need to upate/insert to a table using the code as below: (this store procedure will be invoke every 30 seconds by clients' application) if record already exit than update the record else ...more >>

View question
Posted by Stijn Verrept at 10/19/2003 12:48:15 PM
I have this table: CREATE TABLE [dbo].[ParamPlan] ( [PP_ID] [int] IDENTITY (1, 1) NOT NULL , [PP_PLID] [tinyint] NOT NULL , [PP_SNID] [int] NOT NULL , [PP_CM1] [bit] NOT NULL , [PP_CM2] [bit] NOT NULL , [PP_CM3] [bit] NOT NULL , [PP_CM4] [bit] NOT NULL , [PP_CM5] [bit] NOT NULL , ...more >>

Restoring exclusivly via SQL
Posted by Jason Davis at 10/19/2003 12:33:08 PM
Hi there, I have a sql BAK file that I occasinly FTP to a production server. I'm looking for the appropriate SQL code that will allow me: 1) kill all connections to the restored database 2) restore file fully Thanks! ...more >>

Test For Numeric Data
Posted by Jonesgj at 10/19/2003 9:10:58 AM
Hi, I need to test a column for numeric values (and reject anything which is text or characters such as ?/- etc) I thought there was a Is numeric function I could use, but couldnt find this. Please, can anyone help. Many thanks G Jones ...more >>

xp_sendmail and red exclamation mark
Posted by dk at 10/19/2003 6:09:13 AM
is there a way to add a red exclamation mark with xp_sendmail? marked as important in outlook. tia, dk...more >>

top question
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 10/19/2003 4:25:26 AM
table(name,age) need to find top 2 that are distinct by age. error check: if two names are the same go to next top age). table(name,age) A 17 A 17 <<error B 14 C 16 D 16 got a table like that and select distinct top 2 age from table, returns: A 17 A 17 -- ...more >>


DevelopmentNow Blog