Link to home
Start Free TrialLog in
Avatar of rochestermn
rochestermnFlag for United States of America

asked on

Package variable in SSIS

Im having trouble getting a package variable from control flow over to data flow.

All I need is the date that the package is run and that to become a part of the sql where clause in the data flow task.

Just need someone to help me get from point a to b.  The control flow gets a rundate from a control table.  Then attempts to hand that off to the data flow which uses that rundate as part of the where clause.  Currently im getting parameter errors.  It doesnt seem to like the variable/parm being passed in.

See attachments. User generated image User generated image User generated image User generated image
Avatar of rochestermn
rochestermn
Flag of United States of America image

ASKER

When I try to preview the query I keep getting the following error.

No value given for one or more required parameters.   User generated image
Avatar of DBAduck - Ben Miller
In the first Execute SQL Task, you need to go to the ResultSet option in the Task. In there you will specify 0 and the Variable you want to store the value in.

Then in the Data Flow task, where you have the ?, then click on Parameters button and choose your variable under the Variable option.

Once you have that, the variable should be available to you.  I can do screenshots if you need them.
Yes sir screen shots would be great if its not too much to ask.  If I can get this step down it would be great.
Do you mean this option? User generated image
ASKER CERTIFIED SOLUTION
Avatar of DBAduck - Ben Miller
DBAduck - Ben Miller
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Awsome with a captial A  thanks!