Group by SD.Sales_Order, SD.SO_Line, M.Selling_Price, C.Type, SD.Total_Price, SD.Order_Qty, CP.Sell_Price, CP20.Sell_Price, CP30.Sell_Price, CP40.Sell_Price, M.Class, (Case when (PATINDEX('%RGA%', SH.Comment)>0) then 'R' when (PATINDEX('%MARKETING%', SH.Comment)>0) then 'M' when SD.Material = 'CUSTOM-SPECIAL' then 'C' When SD.Material = 'INSTALLATION' then 'I' when M.Class = 'PRVT LABEL' then 'P' else '' end) as bbb, SH.Source, SH.Ship_Via, SD.MaterialI am trying to use the Case command to create a value in bbb or I could use SH.Source which is a Varchar(20) field. Any ideas on how to do this would be greatly appreciated.
SWProduction