Skip to Content
0
J S
Jul 07, 2020 at 05:25 PM

Incorrect Syntax near Rdr1.ItemCode

64 Views

Hi

SELECT 
CASE
WHEN U_Type = 'U_1' then (Select U_1 from OITM where OITM.ItemCode =  $[RDR1.ITEMCODE])
WHEN U_Type = 'U_2' then (Select U_2 from OITM where OITM.ItemCode =  $[RDR1.ITEMCODE])
END AS Type
FROM [Test].[dbo].[RDR1]

Thanks