DTS - SQL - Text

  • I have created an Execute SQL Task in my DTS package to query for a record in my new table. What I need to do is take the result of that query and create a text file of it. Note there will only be one record found in my SQL Task. I will then take the text file and insert it into a different table.

    The last thing I will attempt is to delete the query result after the record has been written to text with another Delete query

    What I am having problems with is how will I take my query result and create and write a text file?

  • Instead of using a SQL Task, use the DataPump task. Your source is the SQL cut and pasted from the old SQL task. The destination is a text file defined anyway you want.

    Why the text file? Why not go directly to the different table. Do you process the text file further? What's the text file used for?Seems overly complicated.

  • The reason why I want to create a text file from the query is so that I can Define the transformation between the source (results from query) to the destination 2nd table. SO yes I need to process the text file further before I can just plop it into the table

  • quote:


    The reason why I want to create a text file from the query is so that I can Define the transformation between the source (results from query) to the destination 2nd table. SO yes I need to process the text file further before I can just plop it into the table


  • You can't do those transformations in an ActiveX script?

  • Sorry I am a newbie to DTS, I am using SQL 2000 Where is the DataPump Task located? I can't find the Icon for it!

  • This maybe stupid, but why are you using DTS to do this?

    Surely a Stored Procedure that used a cursor based on the query would get you the records you want, you could then massage them within the same SP and finally insert?update them to your target table, all inside the same Stored Procedure. Doing it that way would, I think, be much easier to maintain as you're not introducing any further layers.

    Are there are other circumstances that force you to use DTS (Cross Servers perhaps)


    I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply