Subject | Concatenate field from multiple records |
---|---|
Author | nikicab_1999 |
Post date | 2005-09-22T04:05:36Z |
I appreciate any hint or help with this issue:
I have Groups (of categories) table and Categories table, 1-->many;
Group_id is foreign key in categories table. I need this result set:
Group_id Groupname Categories
1 Name1 Cat1;Cat2;cat5
2 Name2 Cat6;Cat8...
i.e. I want to have just one result field from Category in the form
similar to TStringList.CommaText. Result set will be used in other
JOIN statements.
I am thinking about stored proc with cursor but cannot make anything...
Thanks,
Nick
I have Groups (of categories) table and Categories table, 1-->many;
Group_id is foreign key in categories table. I need this result set:
Group_id Groupname Categories
1 Name1 Cat1;Cat2;cat5
2 Name2 Cat6;Cat8...
i.e. I want to have just one result field from Category in the form
similar to TStringList.CommaText. Result set will be used in other
JOIN statements.
I am thinking about stored proc with cursor but cannot make anything...
Thanks,
Nick