I'm creating a left join on two tables and as expected I'm getting multiple entries because the second table might have multiple entries for the unique number in the first column. Instead of having multiple entries I'd like to have one entry and insert all the values that cause them to be multiple into a semicolon separated column.
What i get just now
Record No | Record Title | Tag No |
1000 | Document | A-100 |
1000 | Document | B-100 |
what I'd like to achieve
Record No | Record Title | Tag No
1000 | Document | A-100; B-100
Any help would be appreciated!
SELECT *
FROM [EDMS_ADOC_MAS] as a
LEFT JOIN [DOCUMENT_TAGS] as b ON a.[DOC_NUMBER] = b.[DOC_NUMBER]
WHERE a.LOCN_CD Like "*MDP6*"