Hi, I ran into an issue and am stuck. I am trying to insert a select statement into a table variable.
--select statement is the following
--I declared the table variable below
How Can I make this work??
You just need to reorder your statements. Declare the temporary table first and then do an INSERT using the SELECT as the operator that will provide the values for the INSERT.
Hope this helps!!
answered May 02, 2012 at 09:00 PM