Hi Anisa,
Try this Query .......
SELECT distinct T2.[DocNum] AS 'Document Number', T2.[DocStatus] AS 'Document Status', T2.[CardName] AS 'Customer/Vendor Name',
T2.[ShipToCode] AS 'Ship-to Code', T1.[Quantity] AS 'Qty' FROM [dbo].[CRD1] T0 ,
[dbo].[INV1] T1 INNER JOIN [dbo].[OINV]T2 on T2.[DocEntry] =T1.[DocEntry]
---- WHERE (T2.[CardName] = (N'General Motors') AND T2.[DocStatus]=(N'O'))
Rgds ,
Kamlesh Naware