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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Help in SQL Query!

Author  Topic 

padsp
Starting Member

21 Posts

Posted - 2006-11-16 : 11:01:44
Hi,

I have a table called phonelist with following data structure:
TABLE:phonelist

intphoneID intestID intcontID ctnbr(dir/fax/email)
100 539 1001 123-23-4587
101 539 1001 457-78-1254
102 539 1001 abc@abc.com
103 539 1002 458-78-6588
104 554 1040 adc@dkd.com

I am looking for SQL statement to produce output like this:

539 1001 123-23-4587 457-78-1254 abc@abc.com
539 1002 458-78-6588
554 1040 adc@dkd.com

Thanks in advance
Bob

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-16 : 11:04:38
see here http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx


KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-16 : 20:16:08
Note that if the concatenated string exceeds 8000 charactes then you need to use more than one variable. If you use front end application, do concatenation there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

padsp
Starting Member

21 Posts

Posted - 2006-11-17 : 15:27:10
Thank you all very much for the reply.
Go to Top of Page
   

- Advertisement -