Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Help Needed

Status
Not open for further replies.

Johnblaze1

Programmer
Sep 17, 2002
25
US
I have data in a format such as;
NAME SEQ POST
Fred 01 Hello and
Fred 02 Welcome

I would like to have the output show as;
NAME POST
Fred Hello and Welcome

So that all values in column POST are concatenated for output. Is this possible with SQL? Otherwise, I am going to have to dump the data and write a small VB procedure to do this.

Any help would be greatly appreciated

Jon
 
Check thread183-1127100.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
What is the max number of values per name? If the number is less (< 5) then use the suggestion that vongrunt provided. If not then create a function to return the concatenated text.

Check the threads below to get you started:
thread183-1100243
thread183-1097598

Regards,
AA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top