I created a stored procedure with table variable and inserted the values to the table variable and returned the table variable column and returns number of integer values.Now i need to select the records from a table depending on the returned result.
+1
A:
I echo Martin's request for clarification. However, if I get you correctly, you are saying you have a table variable with an int column and need to use this int column. Instead of having the stored procedure return the (variable) table's content, you can use the table variable in a JOIN statement together with the table that contains the data you're looking for.
Something like this:
Select * from sourcetable INNER JOIN @tablevariable MyVarTable ON sourcetable.intcolumn1 = Myvartable.intcolumn2
Tobiasopdenbrouw
2010-07-14 12:45:48