RE: Query

RE: Query

 

  

Hi kamal,
No NAME
1 A
2 B
3 C

As per your requirement the following query may solve your problem.
Decalre @commQuery Varchar(100)
set @commQuery = ''
Select @commQuery = @commQuery + Name + ',' From Table

I am new to DB2.This query will work in sqlserver.

With Regards,
Kishore
EXTN:3263
Rapidigm-A Fujitsu Consulting Company



-----Original Message-----
From: [Email address protected]
[mailto:db2udbdba-ezmlmshield-x16478094.[Email address protected]
Sent: Saturday, July 29, 2006 2:33 PM
To: LazyDBA Discussion
Subject: Query



Hi ALL,


I'm

Thanks and Regards,
Kamal K Nelli,
Ph: 9911077055(Mob).



Hi ALL,


I'm having a table with the following values:

No NAME
1 A
2 B
3 C

When we execute a query I would like the result to be like:
ie., In the o/p all the rows in the NAME column should be separated by a comma.

o/p: A,B,C


Thanks in Advance



---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




Confidentiality Notice: This e-mail message is intended only for the personal use of the recipient(s) named above. This message may be an attorney-client communication and as such privileged and confidential. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message.

DB2 & UDB email list listserv db2-l LazyDBA home page