I am trying to figure out how to inner join a table that has ID's to my table that have all the ids in one row separated by commas.
The table with the commas is called (PA):
usersIDs
56488,51233,71055,98304,21577,12500
The table (SU) has the id and the name of the user:
UserID | Name
51233 | Bob Barker
21577 | Billy Knox
56488 | David Miller
etc etc
How can I inner join the name with the comma separated ID's in my first table?
SELECT DISTINCT SU.Name, SU.UserID, SU.Enabled
FROM Sec_User AS SU INNER JOIN
Program_Access AS PA ON SU.UserId = PA.userIDS