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.
Author |
Topic |
Nitu
Yak Posting Veteran
81 Posts |
Posted - 2006-01-31 : 15:30:54
|
Hi I am a newbie to dts. I want to perform the follwing steps in a dts package.1. Connect to ftp server ( I have no problems doing it)2. download file from the ftp server(done this)3. transform data in to an existing table, with following rules: i. check if a similar record exists, then do nothing. ii. if the record exists with the same unique identifier but, some of the fields are not similar, then update the current record by changing one particular field(like date field to capture on which date the record changed), and then insert a new record in to the table. iii. If the record doesnot exist at all, then just insert the new record in to the existing table.Can somebody please give me some ideas and sample code that you have. Thanks a lot in advance,Really appreciate you help,--Nitu |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-31 : 15:55:17
|
Import your data into a staging table. The staging table's DDL should match the layout of the file. Then use T-SQL to do your business rules, meaning to get your data from the staging table to the actual table.Tara Kizeraka tduggan |
 |
|
|
|
|