By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,248 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,248 IT Pros & Developers. It's quick & easy.

Report Help Needed.

P: n/a
I have inheireted a database with the following structure and
requested enhancement. Any advice on how to accomplish this would be
appreciated. All tables are condensed to relevant fields.

Table 1 (Contracts):
ContractID
VendorID

Table2 (Categories):
CategoryID
CategroyName

Table3 (Map Categories to Contracts):
ContactID
CategoryID

What I want to display is comma delimited list of unique Category
Names (alphabetically) for each VendorID. Theer is one vendor per
contact but a given vendor could be party to any number of contracts.
As is indicated by Table3, there can be many Categories per Contact
and though the categories cannot repeat per contract, they can repeat
per vendor if a given category is listed for multiple contracts for
that vendor. My output should look lik this.
VendorID001, "CategoryName01, CategoryName03, CategoryName04"
VendorID002, "CategoryName01, CategoryName02, CategoryName05,
CategoryName06"
VendorID003, "CategoryName02, CategoryName06"
Thanks
DB
Jan 8 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.