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 >>
|