January 27, 2012 at 10:38 am
Hi - I'm not sure if this is the right posting place for this. If not can someone please let me know.
Here we go.
Objective: To NOT delete the Friday 4:00 PM data that is pulled in from an SSIS package
Issue:
My SSIS Package runs M-Sat every 2 hours and loads data into Synonym table called BackLogLaborOld which has the table associated to it called BacklogLabor
End-users connect to another Synonym named BackLogLaborCurrent from excel to report off of which is associated to a table called BackLogLaborB.
From my understanding of Synonyms and why I have the two is it switches back and forth when the SSIS package completes and the end user never sees Excel lockup on them and they always see the new data pull. Basically loading new data into one and the other holds the old data until the job run.
At the start of the SSIS package I have an Execute SQL Task run the following script
DELETE FROM dbo.BackLogLaborold
WHERE (datename(dw,PIT)<>'Friday' or datepart(hh,PIT) <> 16)
If I want to save the 4:00 PM Data pull and not delete it when I run the above script I can refresh excel and I can see it listed on the one run (the 4:00 pm Data) but cannot see it when the next run completes. Then I can see it again when another run completes.
I hope I explained this good enough. Any thoughts on why I’m not seeing the saved data on the second run. I know it there when I query it in SSMS.
I also attached an image of the SSIS package layout
Regards,
D-
January 27, 2012 at 1:58 pm
You're not really giving enough of an explanation. What do you mean by you can't see the data? You mean the data has been deleted, or your report is just not showing it? If you look in the database between two runs has the data been deleted?
PS - if you want to only not delete the data from 4PM friday, you should change that DELETE script to :
DELETE FROM dbo.BackLogLaborold
WHERE (datename(dw,PIT) <> 'Friday' AND datepart(hh,PIT) <> 16)
As it stands, you are leaving data in that table which either has PIT data from any time on Friday, or PIT data from 4PM on any day.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply