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 > september 2007 > threads for sunday september 23

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

Exporting data from a MSSQL 2005 database
Posted by at 9/23/2007 9:41:38 PM
Hi All, I need a sql script that exports data from a single database table into a CSV file. This will be run inside a stored procedure. That is a good place to start, but I also need it to email the attachment to an administrator. Thanks. ...more >>


Return Error Code
Posted by scott at 9/23/2007 7:39:58 PM
My sproc below should run a DTS job. The problem I'm having is with the "error returning" part. When I try to test it from QA, by typng "exec run_DTS" I get an error saying "Procedure 'run_DTS' exxpects parameter '@error', which was not supplied" I'm not well versed at adding return...more >>

Replace in a Text Field
Posted by Cindy Mikeworth at 9/23/2007 2:15:42 PM
I need to perform a search and replace in a text field. I tried the REPLACE function, but am receiving the error that the data type text is an invalid for argument 1 of the replace function. Can this be accomplished with a transact SQL statement? ...more >>

Multi DateParts
Posted by Larry Killen at 9/23/2007 1:01:41 PM
In a Stored Proc, I need to add the hour and min to a DateTime. How is this done? TIA ...more >>

dynamic column name
Posted by Reddy at 9/23/2007 12:16:00 PM
Hi, I have procedure and need to display the column name as the month name based on the stardate variable. I want to name my columns as Jan, Feb and soon on. CREATE PROCEDURE DynamicSalesMonth @startDate datetime, @endDate datetime as begin SELECT CategoryName , CASE ...more >>

TEXT/NTEXT in procedures
Posted by Jay at 9/23/2007 7:55:16 AM
SQL 2000 How can I work with text/ntext data in a procedure? I can see this has been an issue, as 2005 introduced the varchar(max) and I see references to a text pointer (which is what I expected to use), but I can't figure out how to create and work with a string longer than 8,000 bytes...more >>

Need help with a weird select script
Posted by Marc Robitaille at 9/23/2007 1:26:07 AM
Hello, I have a table where I have to keep at least the 2 most recent rows of a combination of fields. The other rows must be moved in another table. I have a combination of three fields to help me to do that. The two first keys are FK fields. The last field is a DateTime field that help my...more >>



DevelopmentNow Blog