After posting I see that adding a brackets around the temp table resolves the syntax issue. For example the following will return results (assuming the Temp table "@Tags" exists as declared previously):
select [@Tags].Tag From @Tags
Similar situation, I am getting the same error: Must declare the scalar variable "@Tag" on the last line. I think I understand why the following fails, but how do I work around it? "select @Tags.tag" for example would not evaluate. In my case, I want to join to a temp table. How do I do...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.