Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

SSIS Logic Expand / Collapse
Posted Monday, July 22, 2013 9:51 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 9:44 AM
Points: 296, Visits: 878
SSIS Package:
1) I am trying to get the value from a look up table into a @intial variable : example say "A" is need to be assigned to @intial
and since value "B" is added today recntly , this needs to go into varialble @max ='B'

look up TABLE:

DATE flag
7/22/2013 B ---@max
7/21/2013 A --@intial

2)After getting this value into variable , pass the value 'B' to the Stored Procedure " to run it once"

3) If there is one more value "C" is added to look up table tommorow then I need to pass
value 'B' to @intial varaible and value'C' to @max variable.

Now the Stored procedure needs to run twice , once for the value'B' and once for value'C' tommorrow.

DATE flag
7/23/2013 C ---@max
7/22/2013 B --@intial

On 7/24/2013 There is no new value added to lookup table , so the max value is 'C' , so stored procedure runs for only 'C' value passed.

How can I do this in SSIS?

Post #1476097
Posted Tuesday, July 23, 2013 1:24 AM



Group: General Forum Members
Last Login: Today @ 1:35 AM
Points: 15,510, Visits: 13,170
I see no reason to do this in SSIS.
SSIS will not "remember" the values you stored in the variables. It only maintains the values of variables during runtime. You'd still have to persist the values in a table.

I would implement your logic in TSQL, probably will be a lot easier.

How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1476380
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse