March 21, 2013 at 12:11 pm
markcrosbie (3/21/2013)
How do I sleect from a populated temporary table using a dynamic querydeclare @Tmp table (.....)
SET @SQLString =N'select * from @Tmp'
EXECUTE sp_executesql @SQLString
I am getting : Must declare the table variable "@Tmp".
The table @Tmp is a table variable and it can't be used this way. You can create a temporary table (#Tmp) and what you are attenpting will work.
March 21, 2013 at 12:37 pm
Aaah...thank you so much
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy