October 27, 2009 at 6:03 pm
Hi All,
I know it may be a simple question but, presently cannot get my head around it.
A stored procedure has a temp table (declare @temp table) which gets filled with the following values and sends it back to the application.
col1 col2 col3 col4 col5
00001 3123 3000 abc ppp
00001 3123 3000 xyz 123
00002 5656 4000 abc 654
what I want the output is
col1 col2 col3 col4 col5
00001 3123 3000 abc - xyz ppp
00002 5656 4000 abc 654
Presently I do this in the the application which is too slow.. Can I do it in the sql writing some joins on the same table...
Any help would be greatly appreciated..
Thanks.
October 27, 2009 at 11:21 pm
What is the criterion for merging? what happend to the value '123' which was in the column 5 of the second row?
..
October 28, 2009 at 9:06 pm
There are a couple of concatenation methods (what you need to do this) along with some things to avoid in the following article...
http://qa.sqlservercentral.com/articles/Test+Data/61572/
--Jeff Moden
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply