NewFromMattel
Programmer
Ok, here's a stumper for me... (probably pretty simple to you SQL gurus)
I have a table of entries, single rows with PK of baseID.
I have another table of categories with PK of catID
I have a "join" table entrycatjoin that has those two PKs.
entries are a 1 to many categories relationship.
what I need is to get all the info for each row of entries, and additionally a column of aggregated categories associated with that entry.
So doing a standard join
select *
from entries e join entrycatjoin ecj on e.baseID = ecj.baseID join categories c on ecj.catID = c.catID
brings back too many rows because there is a row for each category. I want to concatenate the category (description but I can get that) into a list in one column for each row from entries.
I hope I explained it well. I have always used my front end code to do this before, but need to do it in sql now.
Thanks
I have a table of entries, single rows with PK of baseID.
I have another table of categories with PK of catID
I have a "join" table entrycatjoin that has those two PKs.
entries are a 1 to many categories relationship.
what I need is to get all the info for each row of entries, and additionally a column of aggregated categories associated with that entry.
So doing a standard join
select *
from entries e join entrycatjoin ecj on e.baseID = ecj.baseID join categories c on ecj.catID = c.catID
brings back too many rows because there is a row for each category. I want to concatenate the category (description but I can get that) into a list in one column for each row from entries.
I hope I explained it well. I have always used my front end code to do this before, but need to do it in sql now.
Thanks