views:

1318

answers:

1

I want to executing a select statement in SSIS, but this select statement takes a parameter from another component, and the column of this select statement must be used as inputs to other components.

For example:

select id from myTable where name = (column from a previous component).

And the "id" content of the above select statement should be a column that future components can use.

If i add an "OLE DB Command" component, it allows me to refer to other components as inputs, but I cannot generate an output from it. It seems OLE DB Command component is only used for update/insert statements?

Any ideas on how to do it?

+2  A: 
John Saunders
Yes. But how do I specify that graphically? there's like a manual way to drag a link from one table to another. and then I have to add columns to the "lookup column" list. Which one is used to identify the column to be matched, and which one is used to output the matching (other) column?
Saobi
I'll work up an example, but it will take 1/2 hour for all the little screen shots. Do I assume you have one basic flow from a source to a destination, but you need to incorporate the ID column from the MyTable row that matches the Name column of the source? If so, then I'll have example, with a growing number of screen shots in 1/2 hour or so. "Stay tuned!"
John Saunders
@John: Can you point me to syntax as to how I can put images and tables on SO
Raj More
Just type Control-G in the editor for images. Tables don't work at all. See http://stackoverflow.com/editing-help for full editing help.
John Saunders