Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help - SQL Query to join two rows

Author  Topic 

Sanatan
Starting Member

19 Posts

Posted - 2008-05-22 : 16:11:23
Current ResultSet
------------------
ColA ColB
TEST1 111
TEST1 222
TEST2 333
TEST3 444
TEST3 555

I am currently outer-joiing two tables to retrive some data in the above format. My intent is to modify the query so I can retrive the data in below fashion.

Intended ResultSet
------------------
ColA ColB
TEST1 111,222
TEST2 333
TEST3 444,555

Can someone please assist with this? I am not sure if it is possible in a direct query or not... Any expert advice is appreciated.

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-05-22 : 20:09:53
read through this:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53293

Look at the "function route" mentioned by Kristen and Madhi

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -