I've got a table full of search terms, one search term per row.
ID CATEGORYID SEARCH_TERM
1 1 cat
2 1 mat
3 2 sat
....
I need to get the search terms concatenated - is there an easy way to
achieve this?
If I knew how many search terms there were, I could join the table to
itself:
SELECT a.search_term || b.search_term
FROM search_terms a, search_terms b
WHERE a.categoryid = b.categoryid
AND a.id < b.id
(and expand this for n tables).
But I don't know how many search terms there are. Is there a simple
way to do this? Or is it some kind of repeating function that I need
to program?
Thanks
JCSJF