Re: Exporting a variable number of files from DTS...
- From: "Walter Mallon" <waltmallon@xxxxxxxxx>
- Date: Tue, 2 May 2006 16:56:18 -0400
I would use a vbscript that calls a stored proc then loops through the recordset and creates text files with the File System Object and writes the data to them. Just keep checking the server/date and when it changes start writing to a new file. See the post from yesterday "Import text file to multiple tables" for a bunch a examples. You are doing something like the reverse of what he is doing. If you have any coworkers that do VB or VBA this would be fairly easy and not even need to run in a DTS package if you choose just to execute a vbscript instead. If you want it in a DTS then put the code in an activeX script task.
The benefit of using vbscript is that you have total control of what is happening and whether you are working in sql server, Excel, VB, active server pages, etc., the vb syntac is pretty much the same.
Walter
<rlrcstr@xxxxxxxxxxxxxxxxx> wrote in message news:eKrP%23GhbGHA.1260@xxxxxxxxxxxxxxxxxxxxxxx
I want a DTS packag ethat will query a table and, based on a couple of conditions, create several text files.
For instance, let's say that the fields in the table are Date, Server Name and User. I want to create a separate text file for each server/date combination that lists all the users for that server/date combination. There's no fixed number of servers or dates, so the number of files generated might be different every time.
How does one go about doing this with DTS on SQL Server 2000? Thanks.
Jerry
- Prev by Date: Re: Where does the DTS package execute?
- Next by Date: Re: more detail on issue
- Previous by thread: Re: Where does the DTS package execute?
- Next by thread: Re: Exporting a variable number of files from DTS...
- Index(es):
Relevant Pages
|