Unanswered: How to use results of a select as SP input?
I need to insert in TableB the results of a select over TableA so i used:
Insert into TableB (col1, col2, col3) select c1, c2, c3 from TableA
and works OK.
But now i need to use a Stored Procedure "Insert_in_TableB" that handles all the process of checking values, inserting data, logging steps, etc etc. That receives via its parameters the values for validate, etc and then insert them in TableB.
So, how can i execute that procedure (and define its parameters) in a easy way?
Exec Insert_in_TableB (select c1, c2, c3 from TableA)
Select c1, c2,c3 into Insert_in_TableB...
Don't want to use cursors.
if the only way is SSIS, please explain in detail.