Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Data Fetching

Author  Topic 

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2010-12-07 : 03:30:15
Hi,
i need to fetch the data from table and stored the value in user variable in a package..this variable will be referred accross package..

can anyone give suggestion to do this?



yavvie
Starting Member

46 Posts

Posted - 2010-12-17 : 11:12:59
create an Execute SQL Task, there in General write the select (must return only one value, otherwise task fails) and in section Result Set map the result to your variable.
The variable must be created with correct datatype to be accepted and make sure it is for the scope of the whole package (when you create it don't have selected any items in the workflow)
Go to Top of Page

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2010-12-20 : 05:20:06
thanks yavvie,its working
quote:
Originally posted by yavvie

create an Execute SQL Task, there in General write the select (must return only one value, otherwise task fails) and in section Result Set map the result to your variable.
The variable must be created with correct datatype to be accepted and make sure it is for the scope of the whole package (when you create it don't have selected any items in the workflow)


Go to Top of Page
   

- Advertisement -