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

Concatenating one to many data in to single field 1

Status
Not open for further replies.

traveller4

Programmer
Sep 18, 2002
62
CA
I Am trying to take a company_name field in one table that has associated company names in a relational table.

tblCompany

MinFileID MinName

1234 Whole Parts
4567 Ret Parts


tblAsscCompany

ClientID ClientName
7891 Ackland
7892 Duport
7893 Atals




tblCompanyRel
ClientID MinFileID
7891 1234
7892 1234
7893 1234


My output is to have a single concantenated field listing all the related companies



tblCompany Table

MinFileID MinName NewConcantenatedClients

1234 Whole Parts Ackland, Duport, Atals


Is this easily achieved with a cursor
 
Strangely enough there's a FAQ for this very forum (faq183-2146) called Concatenating a one-to-many relationship into a single column. It might be a good place to start. [spin2]

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
Clarkin

I did the keyword search but did not do the faq.

Thanks for being on it

Next time I will look first before I leap

Micheal
 
keyword search? good man!

FYI: when you keyword search (for example for "concatenating") there's an option to search FAQs instead of the forum.



Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top