chethu4u143
15th June 2011, 13:45
Hi Baan Gurus,
Can you help me out in optimizing the below query, i need all the clauses to print my report.
Thanks in advance.
select sdshp910.*
from sdshp910
where sdshp910._index2 = { :sdshp920.fshp, tdilc.koob.act.rpl }
and sdshp910.shpd = :sdshp920.shpd
and sdshp910.rwar between :cwar.f and :cwar.t
and sdshp910.dwar between :dwar.f and :dwar.t
and sdshp910.sreg between :sreg.f and :sreg.t
and sdshp910.owsn = :alia.f
and sdshp910.scut = :scut.f
and (( :curr.dsty = sddoc.dsty.bfin and
sdshp910.bdst between :dset.f and :dset.t )
or ( :curr.dsty = sddoc.dsty.afin and
sdshp910.adst between :dset.f and :dset.t )
or ( :curr.dsty = sddoc.dsty.mass and
sdshp910.mdst between :dset.f and :dset.t ))
and sdshp910.cdac between :cdac.f and :cdac.t
and sdshp910.cuno between :cuno.f and :cuno.t
and sdshp910.cdel between :cdel.f and :cdel.t
and sdshp910.ctyp between :ctyp.f and :ctyp.t
and sdshp910.cfrw between :cfrw.f and :cfrw.t
order by sdshp910.sref
selectdo
Can you help me out in optimizing the below query, i need all the clauses to print my report.
Thanks in advance.
select sdshp910.*
from sdshp910
where sdshp910._index2 = { :sdshp920.fshp, tdilc.koob.act.rpl }
and sdshp910.shpd = :sdshp920.shpd
and sdshp910.rwar between :cwar.f and :cwar.t
and sdshp910.dwar between :dwar.f and :dwar.t
and sdshp910.sreg between :sreg.f and :sreg.t
and sdshp910.owsn = :alia.f
and sdshp910.scut = :scut.f
and (( :curr.dsty = sddoc.dsty.bfin and
sdshp910.bdst between :dset.f and :dset.t )
or ( :curr.dsty = sddoc.dsty.afin and
sdshp910.adst between :dset.f and :dset.t )
or ( :curr.dsty = sddoc.dsty.mass and
sdshp910.mdst between :dset.f and :dset.t ))
and sdshp910.cdac between :cdac.f and :cdac.t
and sdshp910.cuno between :cuno.f and :cuno.t
and sdshp910.cdel between :cdel.f and :cdel.t
and sdshp910.ctyp between :ctyp.f and :ctyp.t
and sdshp910.cfrw between :cfrw.f and :cfrw.t
order by sdshp910.sref
selectdo