Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent Query not returning answer

Status
Not open for further replies.

stressball

Programmer
Mar 14, 2001
68
AU
I have the following query:

select sum(installment) as Total from loan
where nextpaymntdate >= [Please Enter Start Date]
and nextpaymntdate <= [Please Enter End Date]
and balance > 0;

It should work fine, but it is not returning anything, when I know it should as I have run the query (in Oracle syntax) against the same data in Oracle and it returns the correct result. Any ideas would be most appreciated.
 
Did you try it with the dates hard coded? Maybe Access isn't passing the parameters properly..

You can try assigning the data type to the properties in the query. Perhaps Access is passing them as another data type to Oracle instead of Date/Time. You can modify the parameter data type by right clicking in the grey area up top in QBE and selecting parameters.

HTH
Joe Miller
joe.miller@flotech.net
 
The data types are fine, Access is connected to Oracle via ODBC and in Access nextpaymntdate is date/time, in Oracle it is date.
 
Thanks for your input, its solved it was just my regional date settings that was causing no records to be returned.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top