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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenation Via Query?

Status
Not open for further replies.

jt463

IS-IT--Management
Nov 23, 2005
134
I was trying to do this via VB, but after reading a few of the threads in this forum, I think that with some help I may be able to accomplish what I want via SQL.

I am querying a schedule table with the following SELECT statement:

SELECT building_id_, activity_name_, start_date_

Which returns data like:

086, install appliances, 5/2/06
086, install floor, 5/2/06
086, plumbing finish, 5/3/06
086, HVAC finish, 5/3/06
086, clean home, 5/4/06

I want to concatenate all activities for the same date into one field, separated by a ',' (comma).

So, I want my result to be:

086 install appliances, install floor 5/2/06
086 plumbing finish, HVAC finish 5/3/06
086 clean home 5/4/06

I am stumped! Your time and assistance would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top