August 6, 2012 at 3:13 am
select ','+quotename(C.name) from sys.columns as C
where C.object_id = object_id('[CUSCONFIG].[LSCIENCES_C20_INT_GBU_REQUESTDETAILS]')
and C.name in( 'CustomAttribute1','CustomAttribute2','CustomAttribute3',
'CustomAttribute4','CustomAttribute5', 'CustomAttribute6',
'CustomAttribute7', 'CustomAttribute8','CustomAttribute9' )
for xml path('')
August 6, 2012 at 3:23 am
I'm not sure what you'd like explained. We have no sample data etc and obviously no access to the datasource.
You can take a look at http://msdn.microsoft.com/en-us/library/ms178107 to see if it sheds any light on your query.
Best of luck!
:exclamation: "Be brave. Take risks. Nothing can substitute experience." :exclamation:
August 6, 2012 at 3:26 am
Hi thanks i understood the usage of path, the query is returning the result set as an xml
August 6, 2012 at 3:26 am
Its basically created a concatenated string of column names as 1 row instead of multiple rows.
This may also help in understanding the query,
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply