aspose file tools*
The moose likes JDBC and the fly likes Empty result set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Empty result set" Watch "Empty result set" New topic
Author

Empty result set

praveen og
Greenhorn

Joined: Mar 04, 2012
Posts: 5
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

Joined: Dec 07, 2010
Posts: 20

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

Joined: Mar 04, 2012
Posts: 5
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

Joined: Jul 26, 2007
Posts: 10535
    
    9

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
praveen og
Greenhorn

Joined: Mar 04, 2012
Posts: 5
I didn't get any exception . simply it is getting out of my function
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3611
    
  60

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

Joined: Mar 04, 2012
Posts: 5
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 .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Empty result set