When you choose to convert a table to XML and attempt to use XML methods in Service Studio, the application will issue a warning message. However, the SQL statement used is entirely valid and there is no reason for the warning to be displayed. It is unclear whether this is a bug or if it is a matter that could be improved upon by the SQL interpreter.
Unexpected SQL
Unexpected '.' in SQL statement of SQL1. Recheck the SQL to make sure it is valid.
Example SQL:
SELECT (
SELECT num
FROM (
SELECT 1 num
UNION
SELECT 2
UNION
SELECT 3
UNION
SELECT 4
) t FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)')