SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old August 11th, 2003, 12:11 PM
teresa teresa is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 2 teresa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old August 13th, 2003, 03:22 PM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
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

Reply With Quote
  #3  
Old August 25th, 2003, 03:42 PM
teresa teresa is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 2 teresa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks. It worked.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > ASP/Oracle(1)--date calculation & Comparison


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway