dbTalk Databases Forums  

Get comma separated list of integers

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Get comma separated list of integers in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BobRoyAce
 
Posts: n/a

Default Get comma separated list of integers - 05-17-2011 , 09:41 AM






The following query will return one row for each pkLoanID present in
the queried table:

SELECT pkLoanID FROM Loans

So, if there were three records, I would get back three records.

What I want is a query that will instead return just a single row/
value which would equal a comma-separated list of the pkLoanID values
(e.g. 1,2,3).

How can I accomplish with with SQL?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.