I am trying to execute the below query from Ecllips i am getting the following error.
rs = stmt.executeQuery("select"
+"sum(pr.amount)"
+"from trans_log tl,"
+"payment_detail pp,"
+"pft_trans_reltn pr,"
+"pft_encntr pe,"
+"encounter e,"
+"account a"
+"where"
+"pr.beg_effective_dt_tm >= TO_DATE('01/JUN/2015 00:00:00', 'dd/mm/yy hh24:mi:ss') AND pr.beg_effective_dt_tm <= TO_DATE('30/JUN/2015 23:59:59', 'dd/mm/yy hh24:mi:ss')"
+"and pp.payment_detail_id=tl.payment_detail_id"
+"and tl.activity_id=pr.activity_id"
+"and tl.active_ind=1"
+"and tl.trans_type_cd=10982.00"
+"and pr.parent_entity_name='PFTENCNTR'"
+"and pe.pft_encntr_id=pr.parent_entity_id"
+"and a.acct_id=pe.acct_id"
+"and a.acct_type_cd=649377.00"
+"and pe.encntr_id=e.encntr_id"
+"and e.organization_id=589723.00");
I have tried as suggested in this post Oracle Post Link
I am unable to figure out where i am going wrong.
I've tried to add single quotes, but same error:
pr.beg_effective_dt_tm >= TO_DATE(\"01/JUN/2015 00:00:00\", \"dd/mm/yy hh24:mi:ss\")
Errr:java.sql.SQLException: ORA-00900: