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

one-to-many relationships

P: 57
Hi,

I am creating a view of several database tables in SQL. This particular view joins five tables to retrieve the necessary data. One of the tables includes multiple values for the primary in a field. Each primary record can have several of these values and when running the view there are multiple rows of the same primary key with the exception of the field from the multi-table field making each row unique.

What I'm looking for is how to build the view to append the values in the multi-value field into one field delimited by a comma so all rows are unique in the view.

In short, what sql is required to join many fields into one in a view.

Thanks for your help
Apr 2 '09 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
Try posting some some data coming from each tables and your desired output. You may also post whatever T-SQL you have right now.


---- CK
Apr 2 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.