SELECT Col1
FROM Table
WHERE Col2 = 63895746
ORDER BY Col
FOR XML PATH,TYPE
I dont need NULLS in the result.
i want result to be wrapped by something like
< Cols >< /Cols > even if col1 is null or not
In this example Table doesn’t contain any rows for col2 = 63895746 , so i will get an empty result set, so the type directive will make it NULL and return it
How about