Hi Plog
I was hoping to avoid the 'normalisation' question.
My DB is correctly structured, and I'm not generally storing data this way. It's part of a larger problem -
For context, I have a DB recording hockey match details and the umpires.
tblFixtures - holds main info like FixtureID, Date, Team, Venue, Time
related to -
tblFixturesUmpires - just holds foreign keys (FixtureID, UmpireID) to link Umpires with Fixtures
related to -
tblUmpires - has Umpire info like UmpireID, UmpireName, email address, phone number etc
If I run a query to give me all the details of Fixture on a certain date I get 1 row returned;
FixtureID, FixtureDate, TeamName, Venue, Time....
If I run a query to give me all the details of Fixture on a certain date, including Umpires, I get 2 rows returned;
FixtureID, FixtureDate, TeamName, Venue, Time, UmpireName
FixtureID, FixtureDate, TeamName, Venue, Time, UmpireName
for easier reading this could like;
275, 29/09/2018, Mens1, Home, 14:00, John Smith
275, 29/09/2018, Mens1, Home, 14:00, Davy Jones
(as I would expect for a well-structured DB!)
However - for reasons I won't bore you with, for certain procedures, I would like just ONE (merged) record per one fixture
e.g. for a Report - (even when grouped) one fixture will need to appear over 3 lines, or if I want to .SendObject to send an email to people to provide details of a fixture, it will create 2 emails - 1 for each row in the record set, etc.,
So, just somtimes (mainly for presentation purposes), I want to collapse/merge together 2 related records, so I get a single record for a single fixture
e.g.
275, 29/09/2018, Mens1, Home, 14:00, John Smith, Davy Jones
ps _ I don't want to simply concatenate the umpires names in a string, I want them parsed into separate fields.
Hope this makes sense