Hi SQLSister,
Thanks for your post. I've just tried your query, but when I check the syntax I get the following error:
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'Select'.
Server: Msg 170, Level 15, State 1, Line 6
Line 6: Incorrect syntax near ')'.
Also, If...