Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS Logic Expand / Collapse
Author
Message
Posted Monday, July 22, 2013 9:51 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 17, 2013 2:07 PM
Points: 171, Visits: 556
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?

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


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:51 AM
Points: 13,293, Visits: 11,083
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 LessThanDot.

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

Add to briefcase

Permissions Expand / Collapse