Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Adding to a file

Author  Topic 

ibasitas
Starting Member

1 Post

Posted - 2010-06-15 : 15:17:08
Hi,

I have a DTS package that I need to be able to convert to SSIS. What my DTS does is it uses an ActiveX script to call a stored procedure and then it writes to a text file.

The top of the file has a special line that looks like this:
"4","6/15/2010 11:20:02 AM"
the format is "rowcount, date"

I then have the output of the stored procedure. in this example there are 4 rows.
"1","FirstName","LastName","OrderID",..."etc"
"2","FirstName","LastName","OrderID",..."etc"
"3","FirstName","LastName","OrderID",..."etc"
"4","FirstName","LastName","OrderID",..."etc"

so a finished file would look something like this:

"4","6/15/2010 11:20:02 AM"
"1","FirstName","LastName","OrderID",..."etc"
"2","FirstName","LastName","OrderID",..."etc"
"3","FirstName","LastName","OrderID",..."etc"
"4","FirstName","LastName","OrderID",..."etc"


In my old DTS package I was able to add the top line via FSO and then call my stored procedure. I appended the rownumber to each row in the record set.

I'm new to SSIS so I'm not sure how to do this in SQL 2005. It seems the same FSO functions I used before no longer work.

What i'd like to do:

1. Create a new file
2. Call my stored procedure
3. Add a line at the top of the file
4. Add the recordset to the file (but I'd like the rowcount) as the first item in each row
5. ftp that file

Can anyone help an SSIS newbie here. thanks!
   

- Advertisement -