I have a table that saves comma separated values, such as : 1,3,5
This values are the ID of records on a different table, called "Admintags"
When I add a record for a 'casecomment' one of the columns is called 'tags' and this is where I save those comma separated values.
I have the following query:
FROM dbo.Casecomments a
That will return the following values:
caseid | tags | comment
30638 | 1, 5 | Client will be traveling to Mexico City from Dec 15th until Jan 2nd.
What I need the query to return is the value of those tags from the 'tags' table. The tags table is very simple, it only has two columns
id = the ids saved above
tag_text = the text value of the tag, this is what I need in return:
30638 | Travel date, Billing | Client will be traveling to Mexico City from Dec 15th until Jan 2nd.
which are the corresponding values of 1 and 5 in the "Admintags" table.
1 Travel Date
4 Contact method
How can I do an inner join to display those values instead of the ID's that I have in the casecomments table ?