T-SQL Picking up active IDs from a comma seperated IDs list
- by hammayo
I have two tables "Product" having following structure:
ProductID,ProductName, IsSaleTypeA, IsSaleTypeB, IsSaleTypeC
1, AAA, N, N, N
2, BBB, N, Y, N -- active
3, CCC, N, N, N
4, DDD, Y, N, N -- active
5, EEE, N, N, N
6, FFF, N, N, N
7, FFE, N, N, N
8, GGG, N, N, N
9, HHH, Y, N, N -- active
The second table "ProductAllowed" having following…