Dear All,

Dear Freind,

I tried following queary and get the following output.

Queary:

select DocEntry,AbsId,Name,TaxAmount from
(
select I4.DocEntry,MAX(ot.AbsId) as AbsId, oa.Name, sum(I4.TaxSum) as TaxAmount
from inv4 I4
left join ostt ot on ot.AbsId = I4.StaType
left join osta oa on I4.StaCode = oa.Code
where I4.DocEntry = '91'
group by oa.Name,I4.DocEntry

union all

select i2.DocEntry,i2.ExpnsCode As AbsId,ox.ExpnsName As Name,i2.LineTotal As TaxAmount from inv2 i2
left join oexd ox on ox.ExpnsCode = i2.ExpnsCode
where i2.DocEntry in (select DocEntry from inv4 where DocEntry = '91')
)t order by AbsId

Output :

91 1 Packing Charges 2316.000000
91 2 Transportion Charge 3937.000000
91 7 Excise 30605.940000
91 8 ECESS 612.120000
91 9 HCESS 306.060000
91 13 OCTROI 10655.430000
91 14 OCT_SER 106.560000
91 15 VAT_4 14091.300000

Now i want show second entry(Transportation Charge) before OCTROI.
Can we show the specific entry below the specific row.
Can u plz tell me how to this ?
I want following output,

91 1 Packing Charges 2316.000000
91 7 Excise 30605.940000
91 8 ECESS 612.120000
91 9 HCESS 306.060000
91 2 Transportion Charge 3937.000000
91 13 OCTROI 10655.430000
91 14 OCT_SER 106.560000
91 15 VAT_4 14091.300000


Harish Patil