Skip to Content
0
Former Member
Sep 08, 2011 at 11:01 AM

selection problem

20 Views

Experts,

select

T0.DocNum 'AR Invoice Number',

T0.DocDate 'AR Invoice Date',

T0.CardCode,

T0.CardName,

T0.NumAtCard 'Vendor Ref No',

(select sum (T1.Quantity * T1.Price) from INV1 T1 where T1.DocEntry = T0.DocEntry) 'Base Amount',

ISNULL ((select sum (T3.TaxSum) from INV4 T3 where T3.DocEntry = T0.DocEntry and T3.StaType='1'), 0)'VAT Amount',

ISNULL ((select MAX (T3.TaxRate) from INV4 T3 where T3.DocEntry = T0.DocEntry and T3.StaType='1'), 0)'VAT %',

ISNULL ((select sum (T3.TaxSum) from INV4 T3 where T3.DocEntry = T0.DocEntry and T3.StaType='4'), 0)'CST Amount',

ISNULL ((select MAX (T3.TaxRate) from INV4 T3 where T3.DocEntry = T0.DocEntry and T3.StaType='4'), 0)'CST %',

ISNULL ((select sum (T3.TaxSum) from INV4 T3 where T3.DocEntry = T0.DocEntry and T3.StaType='5'), 0)'Service Amount',

ISNULL ((select MAX (T3.TaxRate) from INV4 T3 where T3.DocEntry = T0.DocEntry and T3.StaType='5'), 0)'Service %',

T0.TotalExpns 'Freight Amount',

T0.WTSum 'TDS Amount',

T0.DocTotal 'Document Total'

from OINV T0

where T0.DocDate >= [%0]

and T0.DocDate <= [%1]

The above query in SBO Query manager gives error for the selection critrias

Please help