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

Approch For picking each value from the table and assign to package variable and use. Expand / Collapse
Author
Message
Posted Monday, February 11, 2013 8:01 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 6:27 AM
Points: 20, Visits: 147
Hi all,

I have a requirement like, In my table have a data as shown below

Table:-

ID Tablename
---------------------------
1 Table1
2 Table2
3 Table3
.
.
.
N Tablen

I need a package to pick each tablename column value and assign that to variable and used it in next tasks in package.


Thanks



Post #1418454
Posted Monday, February 11, 2013 4:58 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
You can select values from your table into a Variable of Type Object using an Execute SQL Task. Then you can iterate over that Variable using the ForEach Loop Container (FELC) setup with an Enumerator of type Foreach ADO Enumerator. The FELC can assign each column in the resultset to a different variable so you can work with variables that contain the name and id in Tasks contained within the FELC.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1418688
Posted Monday, February 11, 2013 11:25 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 6:27 AM
Points: 20, Visits: 147
Thanq very much for you approch, It work for me
Post #1418759
Posted Tuesday, February 12, 2013 7:58 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
You're welcome. Thanks for the feedback.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1418983
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse