SELECT DISTINCT a.StockCUC ---CUC
,b.StockCatShortName --Category
,a.StockCUCCanUse ---- Can Use Column
,c.StockCUC as 'CanUseCross' ---Cleaned up Can Use Column
FROM gxwizmo_24.dbo.stockcuc a
JOIN gxwizmo_24.dbo.stockcategory b
ON a.StockCatId = b.StockCatId
LEFT JOIN gxwizmo_24.dbo.STOCKCUC c
ON a.stockcuccanuse like '%' + c.stockCUC + '%' ----this is doing a join using a like statement. Weeds out the other BS that is in the can use column
AND a.StockCatId = c.StockCatId ---this restricts your results to the SAME category, which makes the results more accurate
WHERE b.StockCatShortName = 'OS-RAD' ---change category here