Home » SQL & PL/SQL » SQL & PL/SQL » Concatenating values into a single result
Concatenating values into a single result [message #9994] Fri, 19 December 2003 05:25 Go to next message
amanda
Messages: 7
Registered: December 2003
Junior Member
I have a SQL question for you, O Grand SQL Master. Is it possible to concatenate strings from multiple records into one result in a query?

For example if TABLE A has the following records:
Vendor City
v1 Fairfax
v1 Richmond
v2 Fairfax
v2 Arlington

I'd want a single record returned for each vendor, with a concatenation of all the corresponding City values, such as "Fairfax,Richmond".

Is this possible to do in a single query?
Re: Concatenating values into a single result [message #9995 is a reply to message #9994] Fri, 19 December 2003 05:45 Go to previous message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Do you have 9i?HTH,

Art
Previous Topic: user level and dba level command list
Next Topic: cost optimizer problem
Goto Forum:
  


Current Time: Thu Apr 25 14:55:32 CDT 2024