Subject | Query returns invalid result |
---|---|
Author | Rick DeBay |
Post date | 2004-10-07T21:57:16Z |
The following SQL returns zero when executed through Jaybird, and
returns 75 if executed through Database Workbench. There are no
exceptions thrown at any point, and the classes being passed to
setObject() are confirmed as java.sql.Date and java.lang.String.
I'm using FB 1.5.1 and JB 1.5.1 (Sep 17 version).
SELECT COUNT(CPR1.CLAIMSTS) - (SELECT COUNT(CPR2.CLAIMSTS) FROM
CLAIMSPAIDREVERSED CPR2 WHERE
CPR2.DATESBM>=?
AND CPR2.DATESBM<=?
AND CPR2.CLAIMSTS='X' AND CPR2.ACCOUNTID=?)
FROM CLAIMSPAIDREVERSED CPR1 WHERE CPR1.DATESBM>=?
AND CPR1.DATESBM<=?
AND CPR1.CLAIMSTS='P' AND CPR1.ACCOUNTID=?
Params:
'2004-09-23'
'2004-09-23'
SSPK
'2004-09-23'
'2004-09-23'
SSPK
Rick DeBay
Senior Software Developer
RxStrategies.net
returns 75 if executed through Database Workbench. There are no
exceptions thrown at any point, and the classes being passed to
setObject() are confirmed as java.sql.Date and java.lang.String.
I'm using FB 1.5.1 and JB 1.5.1 (Sep 17 version).
SELECT COUNT(CPR1.CLAIMSTS) - (SELECT COUNT(CPR2.CLAIMSTS) FROM
CLAIMSPAIDREVERSED CPR2 WHERE
CPR2.DATESBM>=?
AND CPR2.DATESBM<=?
AND CPR2.CLAIMSTS='X' AND CPR2.ACCOUNTID=?)
FROM CLAIMSPAIDREVERSED CPR1 WHERE CPR1.DATESBM>=?
AND CPR1.DATESBM<=?
AND CPR1.CLAIMSTS='P' AND CPR1.ACCOUNTID=?
Params:
'2004-09-23'
'2004-09-23'
SSPK
'2004-09-23'
'2004-09-23'
SSPK
Rick DeBay
Senior Software Developer
RxStrategies.net