Marcus Aurelius
asked on
SQL Server for XML PATH giving wrong results.
Experts:
This script:
select [name] + ', ' as NameTest
from tempdb.sys.columns where object_id = object_id('tempdb..##attri bute2')
for xml path('')
Results in this:
<NameTest>Column_1_Name, </NameTest><NameTest>Colum n_2_Name, </NameTest><NameTest>Colum n_3_Name, </NameTest><NameTest>Colum n_4_Name, </NameTest>
How do I modify the script to produce THIS:
Column_1_Name, Column_2_Name, Column_3_Name, Column_4_Name
Any assistance is greatly appreciated!
This script:
select [name] + ', ' as NameTest
from tempdb.sys.columns where object_id = object_id('tempdb..##attri
for xml path('')
Results in this:
<NameTest>Column_1_Name, </NameTest><NameTest>Colum
How do I modify the script to produce THIS:
Column_1_Name, Column_2_Name, Column_3_Name, Column_4_Name
Any assistance is greatly appreciated!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
Open in new window
Then call it likeOpen in new window