|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Date Logic for a DTS packageHello,
I need to facilitate updating a data warehouse table with a DTS package that updates an accounting table for premium amounts. I will do a one time run of all the accounting records and after that would like to 'grab' just the previous 2 months worth of data (on a nightly run, so that it is up to the day) and add it to the existing data. Obviously, there will be overlap in dates, so what would be a good way to handle this with my logic? Thank you! Hi Patrice
It is not clear what exactly you are trying to achieve. If you use a query as the source of your data, then you can limit the data that is extracted by a criteria (assuming that you have datatime value that will give you the last two months). If your destination is accessable through a linked server you could exclude those rows that do not exist in the destination table (using the primary key), this will mean that the time restriction is unneccessary. If you can't use a linked server, then you can load the data into a staging table, and then selectively insert new records (using the existance of the PK) from there. John Show quote "Patrice" wrote: > Hello, > > I need to facilitate updating a data warehouse table with a DTS package that > updates an accounting table for premium amounts. I will do a one time run of > all the accounting records and after that would like to 'grab' just the > previous 2 months worth of data (on a nightly run, so that it is up to the > day) and add it to the existing data. Obviously, there will be overlap in > dates, so what would be a good way to handle this with my logic? > > Thank you! |
|||||||||||||||||||||||