Click here to Skip to main content
15,900,616 members

Comments by Member 9748847 (Top 2 by date)

Member 9748847 29-Jan-13 4:37am View    
@Tharaka
The solution is correct but there is a huge performance overhead.
For the same no of output recores, using FOR XML PATH in 2005/2008 takes no time while COALESCE taking 23-26 sec.

This time difference is un-affordable and it makes the application to throw exceptions.

I tried with FOR XML AUTO in 2000, it takes no time but the problem in its giving records for the concatenated column in XML format.
Like:
ID NAME
1 <e name="A"><e name="B"><e name="C">
2 <e name="D"><e name="E">

Please suggest.
Member 9748847 28-Jan-13 7:39am View    
@CHil60 Tried XML RAW. Its giving result in the XML format. Something like:
ID NAME
1 <row name="A"><row name="B"><row name="C">
2 <row name="D"><row name="E">

If you think XML RAW will work, can you please write a simple query that will give the required output.

Thanks in advance.