Skip to content

Tag: sql

Assigning result of For Xml and With clause to a variable

I’m trying to use XML for to concatenate a bunch of columns together and then assign the result set to a variable. I’m using ‘with’ clauses because my initial sub-queries contain calculated fields that later sub-queries need to generate additional fields. When I run it gives Lookup Err…