Hi im trying to get the following results
Table1
ID | Name
1 | Name1
2 | Name2
Table2
ID | State | NameIDS
1 | NY | 1,2
2 | ZA | 1
I am trying to joun by th entire array so i get
ID | State | NameIDS
1 | NY | Name1,Name2
2 | ZA | Name1
trying to get this in a single query ive tried
Select Table2.ID,State,Table1.Name
From Table2
JOIN Table1 ON FIND_IN_SET(Table1.ID, Table2.NameIDS) != 0
But this gives me
ID | State | NameIDS
1 | NY | Name1
1 | NY | Name2
2 | ZA | Name1