I'm trying to find a neat and elegant way of including a special kind of summary field in a SQL statement. I have 2 tables in a one-to-many relationship and the second table contains a field with text in (first table is contact information, 2nd contains areas that the person is prepared to work).
I want to find a neat way of pulling up contact records with a summary field that contains ALL the areas separated by commas e.g
Areas:North West,North East,Wales,Scotland
Anyone got any good ideas? I could create a summary table and make a trigger (on the 2nd table) to create the summary information whenever there's a change, but I'd like a purely (client-side) SQL based solution if possible.