I manage a database where we track our customer’s mailing lists. I have several different tables which store various pieces of information:
• Profile Table – ID, Name, address, customer ID, phone, etc.
• Customer Table – ID, Customer name, etc.
• Mailing Lists – ID, Mailing list name, etc.
• Invitations – Profile ID, Mailing list ID
I want to create a query that shows all the mailing lists that each person is currently on. This is easy to set up, but the results are like this:
JaneDoe CustomerX MailingList1
JaneDoe CustomerX MailingList3
JaneDoe CustomerX MailingList6
JohnDoe CustomerX MailingList1
JohnDoe CustomerX MailingList2
JohnDoe CustomerX MailingList4
Is there any way to set up my query so that the results are all grouped by the person, and that each mailing list is in its own column (and if they're not on that specific list, the field is blank for that record)?
JaneDoe CustomerX MailingList1 MailingList3 MailingList6
JohnDoe CustomerX MailingList1 MailingList2 MailingList4
• Profile Table – ID, Name, address, customer ID, phone, etc.
• Customer Table – ID, Customer name, etc.
• Mailing Lists – ID, Mailing list name, etc.
• Invitations – Profile ID, Mailing list ID
I want to create a query that shows all the mailing lists that each person is currently on. This is easy to set up, but the results are like this:
JaneDoe CustomerX MailingList1
JaneDoe CustomerX MailingList3
JaneDoe CustomerX MailingList6
JohnDoe CustomerX MailingList1
JohnDoe CustomerX MailingList2
JohnDoe CustomerX MailingList4
Is there any way to set up my query so that the results are all grouped by the person, and that each mailing list is in its own column (and if they're not on that specific list, the field is blank for that record)?
JaneDoe CustomerX MailingList1 MailingList3 MailingList6
JohnDoe CustomerX MailingList1 MailingList2 MailingList4
Comment