Hi Suman,
Try:
SELECT T0.[CardCode], T0.[CardName], T3.[DocNum] as 'Sales Order No', T3.[DocDate] as 'Sales Order Date',
T0.[DocNum]as 'Invoice No',T0.[DocDate] as 'Invoice Date', T1.ItemCode, T1.[Price] 'Price from order', T2.Price 'Price from invoice', T1.[DiscPrcnt] 'Discount from order row',T2.[DiscPrcnt] 'Discount from Invoice row' ,T0.[DiscPrcnt] 'Discount from order', T3.[DiscPrcnt] 'Discount from Invoice'
FROM OINV T0
INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN RDR1 T2 ON T1.[BaseEntry]= T2.[DocEntry] and T2.[TargetType] =13 AND T1.BaseLine=T2.LineNum
INNER JOIN ORDR T3 ON T2.DocEntry = T3.DocEntry
WHERE T1.[Price] <> T2.[Price] AND T0.CardName Like '%[%0]%'
Thanks,
Gordon