This is a multi-part message in MIME format.
------_=_NextPart_001_01C1B665.BCD7899E
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
In your DTS package add a ActiveX Script task
and you can pretty much do everything in this task as in VB
-----Original Message-----
From: Zadoyen, Eva [mailto:EZadoyen@s...]
Sent: Friday, February 15, 2002 4:08 PM
To: sql language
Subject: [sql_language] RE: Save Query results to the file
Thanks for reply, Denis.
But this is in VB, that I don't want to use.
The procedure will be running automatically and I'm not sure if thru DTS
I will be able to rename the file.
Also, I know about osql utility, but couldn't make it work to create the
right format.
May be there are some extended stored procedure that will allow you to
do it directly from my proc.
Eva
-----Original Message-----
From: Denis Gobo [mailto:dgobo@w...]
Sent: Friday, February 15, 2002 4:01 PM
To: sql language
Subject: [sql_language] RE: Save Query results to the file
If I understand you correctly you want to run a query and store the
result in an excel file
You don't want to use VB
How about DTS, you can create an excel file every time you run this
package and give it the name with the date and simply delete the old
excel file.
I use CreateObject("Scripting.FileSystemObject") for textfiles, you will
need to create an excel object something like this
Dim ExcelSheet As Object
Set ExcelSheet =3D CreateObject("Excel.Sheet")
I hope this gave you some usefull info
-----Original Message-----
From: Zadoyen, Eva [mailto:EZadoyen@s...]
Sent: Friday, February 15, 2002 3:43 PM
To: sql language
Subject: [sql_language] Save Query results to the file
Hi, guys!
Does anybody know the best way to save results of the query in stored
procedure into the excel file directly inside the procedure.
It will be running every day and should be saved in the same folder,
but I need to rename file with the date included in the name.
I'm trying to avoid using VB in this case.
Any suggestions will be appreciated.
Thanks,
Eva
$subst('Email.Unsub').
$subst('Email.Unsub'). ---
$subst('Email.Unsub').