In one of my tables I am storing GroupIDs in a format of: '2#3#5' which means a user belongs to groups 2, 3 and 5. How can I amend my query to state g.GroupID IN (2,3,5) ? Where it's getting 2,3,5 FROM
SELECT GroupIDs FROM BW_Staff WHERE StaffCode = ''
// Output: 2#3#5
g.GroupID IN (2, 3, 5) 2, 3, 5 values needs to be from this query so it needs to be splitted by hash?
SELECT g.Name, u.StaffCode, SUBSTRING(u.Perms, 47, 1) AS Staff_Perm_Grant,
SUBSTRING(g.Perms, 47, 1) AS Group_Perm_Grant
FROM BW_Groups g,
BW_Staff u
WHERE g.GroupID IN (2, 3, 5) and u.StaffCode = 'KAA'
thanks for any help