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!

concatunate comments

Status
Not open for further replies.

abenitez77

IS-IT--Management
Oct 18, 2007
147
US
I have 2 tables. 1 - header table 2- comments table.
There are multiple comments in the comments table that are related to 1 header record. I want to select fields from header table and where I have multiple records in the comments table, I want to view that as 1 record, by concatunating the records to look like 1 record. How can i do this?

ie:
header
ID vendor# Vendor name Year
1 12345 ABC 2009
2 23453 ACME 2010

comments table:
ID vendor# Comments
1 12345 This is a test comment to see if it works.
2 12345 Add this to make it 1 record.
3 12345 Yes, it works.
4 23453 Another comments line.
5 23453 See if it works now?

Results
ID Vendor# Vendor name Year Comments
1 12345 ABC 2009 This is a test comment to see if it works. Add this to make it 1 record. Yes, it works.
4 23453 ACME 2010 Another comments line. See if it works now?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top