How to get all records in one row

Moderator: NorbertKrupa

Post Reply
mayankgupta18
Newbie
Newbie
Posts: 3
Joined: Thu Feb 07, 2013 7:58 am

How to get all records in one row

Post by mayankgupta18 » Fri Feb 08, 2013 7:41 am

Hello

Suppose I have data in table :

Col1 | Col2
ABC | 1
ABC | 2
ABC | 3
XYZ | 1
XYZ | 2

I need output like

Col1 | Col2
ABC | 1,2,3
XYZ | 1,2

Any pointers ???

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: How to get all records in one row

Post by JimKnicely » Fri Feb 08, 2013 1:57 pm

Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “New to Vertica SQL”