Hi,
I have an access database with multiple tables that I need to export into a single spreadsheet. The tables are set up with one-to-many relationships between them; for example, in my Collection table, I have a song ID and the title of the song (each song only appears once in this table). In my Composers table, I have the song ID along with a composer's name. In the Composers table, songs can have multiple composers, in which case a given song will appear in multiple records, each time with a different composer's name.
So when I run a query that appends the names from the Composers table to the songs from the Collection table, I end up with each song having an extra record for each additional composer. Incidentally, I don't know whether there is any limit to the number of composers a song may have.
Is there a way to write a query that can put each individual composer in a separate field, but keep them all in the same record? I need all of the information for each song to appear on a single line.
So, this is what I'm getting now:
CollectionID | Title | Composer
20 | No one will ever know my heart | Foree, Mel
20 | No one will ever know my heart | Rose, Fred
21 | Pal of my cradle days | Piantadosi, Al
22 | Perfect song | Breil, Joseph C.
23 | Say mister have you met Rosie's sister | Harrison, Charles, 1883-1955
23 | Say mister have you met Rosie's sister | Rose, Fred
24 | Three little words | Ruby, Harry
And this is what I need:
CollectionID | Title | Composer1 | Composer2
20 | No one will ever know my heart | Foree, Mel | Rose, Fred
21 | Pal of my cradle days | Piantadosi, Al
22 | Perfect song | Breil, Joseph C.
23 | Say mister have you met Rosie's sister | Harrison, Charles, 1883-1955 | Rose, Fred
If this isn't possible with a query, could you recommend another approach?
Thanks,
Liz