Saqib Khan
asked on
DTS Structure Help
Hello,
i am new when it comes to DTS in SQL Server. I want to do the Following.
Generate a Text File on weekly bases from a SQL Server 2000 DB.
after File is been generated i want to store the ID number of Each row(that was inserted into a text file) into another table (such as a Log Table).
So i know the first Step. Like
Data Source (SQL Server Table) ----------> Text File (Destination)
This works fine, generates the Text file, but then how do i Execute a SQL Query to insert Records into a Table(storing whatever was inserted into the Text File).
I mean how do we define steps, i am so confused about defining Steps in DTS Like from here to There and there to execute a batch or what so ever.
Thanks
i am new when it comes to DTS in SQL Server. I want to do the Following.
Generate a Text File on weekly bases from a SQL Server 2000 DB.
after File is been generated i want to store the ID number of Each row(that was inserted into a text file) into another table (such as a Log Table).
So i know the first Step. Like
Data Source (SQL Server Table) ----------> Text File (Destination)
This works fine, generates the Text file, but then how do i Execute a SQL Query to insert Records into a Table(storing whatever was inserted into the Text File).
I mean how do we define steps, i am so confused about defining Steps in DTS Like from here to There and there to execute a batch or what so ever.
Thanks
ASKER
here is what I want
Step 1 : Generate a Text File From a SQL Server Table
Step 2 : after File is generated, whatever Records were inserted into the Text file I want to store them into another Table as a Log (say the ID field for each record)
Step 1 : Generate a Text File From a SQL Server Table
Step 2 : after File is generated, whatever Records were inserted into the Text file I want to store them into another Table as a Log (say the ID field for each record)
ASKER
as you advised, i clicked on SQL Connection(Source) and Text file(destination), both Selected and then I clicked on WorkFlow "on success" . i get this error message..
"Defining precedences beetween the selected items is not valid"
"Defining precedences beetween the selected items is not valid"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is it ok if the do the following.
up to Step 1 as you mention.
on Step Two choose Source Text File and Sql ServerDestination. this will import results into Log table from source file.
after this process is done, is there a method to empty/clear the content in text file?
thanks
up to Step 1 as you mention.
on Step Two choose Source Text File and Sql ServerDestination. this will import results into Log table from source file.
after this process is done, is there a method to empty/clear the content in text file?
thanks
ASKER
in DTS, how does it know "what is the very First Step", or it looks for any object that has no "workflow" executes first?
<< how do i Execute a SQL Query to insert Records into a Table >>
What do you actually want to do? Do you want to insert the records in the text file into another table?
To execute a sql query you can use "execute SQL Task"
<<i am so confused about defining Steps in DTS Like from here to There and there to execute a batch or what so ever.>>
you should choose two items and then go to workflow tab and choose the appropriate work flow task.