SQL Server Performance

DTS

Discussion in 'SQL Server DTS-Related Questions' started by SATISD9X, Aug 1, 2008.

  1. SATISD9X New Member

    Hi,I want to create a DTS package which has the following requirement:I have a JOIN Query for 3 tables which fetches few records from Source DB. I want to loop through the result set which is fetched from the Source DB.At each record it should check for a specific condition. (COND 1)If it doesn't satisfy the condition (COND 1) then, it should ADD record (Row of fetched Resultset) in two different tables in the Destination DB.If the condition (COND 1) satisfies then, it should check for another condition (COND 2).If it doesn't satisfy the condition (COND 2) then, it should Update the details (Row of fetched Resultset) in two different tables in the Destination DB.If the condition (COND 2) satisfies then, it should ADD record (Row of fetched Resultset) in one table in the Destination DB.How would I achieve this?(I've created two connection [one for Source DB and another for Destination DB] connected with a 'Transform Data Task'. Also, I've created 'Execute SQL Task' in which I've written the JOIN query of 3 tables which will fetch me the desired output.)Regards,Satish
  2. satya Moderator

    You could manage that with stored procedures by output results to temp table and then perform further calculations.

Share This Page