hi All
What is wrong with the inner select statement
SELECT T0.[DocNum], T0.[DocDate], T1.[ItemCode], T0.[CardName] 'Pary Name',T1.[Dscription], 1.[LineTotal],t1.[U_Type] ,t1.[U_DIA_WF],(select t3.descr from ufd1 t3 inner join cufd t4 on t3.tableid = t4.tableid and t3.fieldid = t4.fieldid where t4.aliasid = ‘Type’ and t3.fldvalue = t1.[u_type]) OrderType
FROM Oinv T0 INNER JOIN inv1 T1 ON T0.DocEntry = T1.DocEntry inner join ocrd t2 on t0.cardcode=t2.cardcode WHERE T0.[DocDate] >=[%0] and T0.[DocDate] <=[%1] and T1.[Dscription] =[%2]
Thanks