Package failing on Date Conditions
I have a data flow task which picks the records from source table and inserts them into a destination table. The conditional split i currently have is: the insert_date in the source table should be greater than or equal to (getdate()-1) and less than getdate() (i have time in it ). so the condition i have is : (insert_date >= DATEADD("dd",-1,GETDATE())) && (insert_date < GETDATE()). The problem I am am facing here is: what happens if the package fails on one day , but is successfully executes the following day. let say the package failed on friday at 11 and i try to execute the package o monday..so i have to manually change the condition to: (insert_date >= DATEADD("dd",-3,GETDATE())) && (insert_date < GETDATE()). Is there an automated way that i can solve my existing problem?? any help would be appreciated. thanks
June 23rd, 2011 5:22pm

Hi From the bit of information you have provided, I would rather keep the last imported datetime stored in a database table somewhere and use that as my lower boundary or actually query the destination table for it's maximum date. That way if the package fails, it keeps trying from the last date that has successfully been imported. An additional suggestion is to add the filter criteria to your query from the source as opposed to using a Conditional Split after. That will reduce the data set that you are working with and improve performance. HTHCraig Bryden - Please mark correct answers
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2011 5:46pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics