Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Empty result set

 
praveen og
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me also getting the same error . Db connection is perfect and query is fetching value from db . But when trying to connect through java i am getting empty result set . Any help is appreciated.

Praveen og
 
ripu sudan
Greenhorn
Posts: 20
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
praveen og wrote:For me also getting the same error . Db connection is perfect and query is fetching value from db . But when trying to connect through java i am getting empty result set . Any help is appreciated.

Praveen og




can You please post your query?
 
praveen og
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SELECT par_lve_ent_rule_sys_id,
lve_ent_rule_sys_id,
lve_pd_typ_sys_id,
crew_cntrct_typ_cd,
rank_cd,
stn_cd,
lve_max_qty,
yrs_svc_fm_qty,
yrs_svc_to_qty,
max_service_days,
max_ngtve_lve_entlmt,
min_entlmt_aft_byback,
max_buy_back,
lve_min_qty,
long_service_qty
FROM lve_entitlement_rules
WHERE crew_acy_typ_cd = 'LS'
AND lve_pd_typ_sys_id IN
(SELECT lve_pd_typ_sys_id
FROM lve_period_types lpt,
fleets f
WHERE lpt.fleet_sys_id = f.fleet_sys_id
AND f.fleet_sys_id = 6
AND lpt.tm_pd_typ_cd = 'Y')
AND to_date('2012-03-05 12:06:51.596', 'YYYY-MM-DD HH24:MI:SS.###') BETWEEN eff_fm_dt
AND eff_to_dt

 
Maneesh Godbole
Saloon Keeper
Posts: 11085
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.
Do you see any exceptions being thrown?

praveen og wrote:

Also, please check your private messages for an important administrative matter.
 
praveen og
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't get any exception . simply it is getting out of my function
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd guess that there is an implicit conversion taking place somewhere, and your NLS settings in Java is different from NLS settings in your DB client. However, it is just a guess. You need to TellTheDetails (click that link); in this case, post the Java code which constructs and executes the statement, and preferably also the description of the lve_entitlement_rules table (run DESC lve_entitlement_rules in your DB client and copy the output here).
 
praveen og
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all for your quick responses .I solved the issue by substituting sysdate instead of giving new date from java . Any way the issue is still unknown for me why its not wrking from java part .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic