Hi Friend......... ....
I am a oracle developer. I have a
question, hope you would reply me.Thanks in advance for your time.
I tried the following query :
select c.cldt_status,
a.ledg_clntidno ,
a.ledg_dctpcode ,
a.ledg_idjoint,
a.ledg_clntidno ||'-'||a.ledg_dctpc ode||'-'||a.ledg_idjoi nt ClientID,
ltrim(b.clms_ti tle||' '||clms_initial s||' '||clms_name) name,
a.ledg_cfamt,le dg_lgtpcode
from BBOS.stledger_m ovement a,
BBOS.smclient_m aster b,
BBOS.smclient_f indetails c
where a.ledg_clntidno = b.clms_clntidno
and a.ledg_dctpcode = b.clms_dctpcode
and a.ledg_idjoint = b.clms_idjoint
and b.clms_clntidno = c.cldt_clntidno
and b.clms_dctpcode = c.cldt_dctpcode
and b.clms_idjoint = c.cldt_idjoint
and a.ledg_cfamt > 0
and a.ledg_transeqn o = (select max(d.ledg_tran seqno)
from BBOS.stledger_m ovement d
where d.ledg_clntidno = a.ledg_clntidno
and d.ledg_dctpcode = a.ledg_dctpcode
and d.ledg_idjoint = a.ledg_idjoint
and to_char(d.ledg_ trandate,'dd/mm/yyyy') = (select to_char(max(e.l edg_trandate),' dd/mm/yyyy')
from BBOS.stledger_m ovement e
where e.ledg_clntidno = a.ledg_clntidno
and e.ledg_dctpcode = a.ledg_dctpcode
and e.ledg_idjoint = a.ledg_idjoint
and e.ledg_trandate < :p_date+1))
order by to_number(a.led g_clntidno)
But the above query did not work. Query keeps on running, not ending.
Above tables has over 20,000 records.
Can you please help me in solving my problem.
Thank you,
Kumudu.
I am a oracle developer. I have a
question, hope you would reply me.Thanks in advance for your time.
I tried the following query :
select c.cldt_status,
a.ledg_clntidno ,
a.ledg_dctpcode ,
a.ledg_idjoint,
a.ledg_clntidno ||'-'||a.ledg_dctpc ode||'-'||a.ledg_idjoi nt ClientID,
ltrim(b.clms_ti tle||' '||clms_initial s||' '||clms_name) name,
a.ledg_cfamt,le dg_lgtpcode
from BBOS.stledger_m ovement a,
BBOS.smclient_m aster b,
BBOS.smclient_f indetails c
where a.ledg_clntidno = b.clms_clntidno
and a.ledg_dctpcode = b.clms_dctpcode
and a.ledg_idjoint = b.clms_idjoint
and b.clms_clntidno = c.cldt_clntidno
and b.clms_dctpcode = c.cldt_dctpcode
and b.clms_idjoint = c.cldt_idjoint
and a.ledg_cfamt > 0
and a.ledg_transeqn o = (select max(d.ledg_tran seqno)
from BBOS.stledger_m ovement d
where d.ledg_clntidno = a.ledg_clntidno
and d.ledg_dctpcode = a.ledg_dctpcode
and d.ledg_idjoint = a.ledg_idjoint
and to_char(d.ledg_ trandate,'dd/mm/yyyy') = (select to_char(max(e.l edg_trandate),' dd/mm/yyyy')
from BBOS.stledger_m ovement e
where e.ledg_clntidno = a.ledg_clntidno
and e.ledg_dctpcode = a.ledg_dctpcode
and e.ledg_idjoint = a.ledg_idjoint
and e.ledg_trandate < :p_date+1))
order by to_number(a.led g_clntidno)
But the above query did not work. Query keeps on running, not ending.
Above tables has over 20,000 records.
Can you please help me in solving my problem.
Thank you,
Kumudu.
Comment