|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
ASP/Oracle(1)--date calculation & Comparison
Hi,
I need to run a query to get records with date withing 30 days from current date. What I used to do with SQL server 2000 was the following: Date30More = Date+30 MPQry = "SELECT * FROM SOP_T where Rev_Date < '" & Date30More This stops working with Oracle because Rev_Date in Oracle is in the format of "DD-MON-YYYY HH:MM:SS PM". Therefore, I received an error message as the following: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Oracle][ODBC][Ora]ORA-01858: a non-numeric character was found where a numeric was expected Please let me know what is the best way to solve this problem. Thanks. Teresa |
|
#2
|
||||
|
||||
|
i think you just forgot your ' at the end of the date
try this Code:
Date30More = Date+30 MPQry = "SELECT * FROM SOP_T where Rev_Date < '" & Date30More & "'"
__________________
My brain cells are like a storm trooper's armor: useless |
|
#3
|
|||
|
|||
|
Thanks. It worked.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP/Oracle(1)--date calculation & Comparison |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|