Unix Technical Forum

Re: data comparision in Oracle

This is a discussion on Re: data comparision in Oracle within the Oracle Miscellaneous forums, part of the Oracle Database category; --> I noticed that the date format is wrong. I've changed the query to select * from tableA where to_date(substr(errinfo$datetime, ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-07-2008, 09:24 AM
abjiang
 
Posts: n/a
Default Re: data comparision in Oracle


I noticed that the date format is wrong. I've changed the query to

select * from tableA where to_date(substr(errinfo$datetime, 1,
19),'yyyy-mm-dd hh24:mi:ss') - sysdate)<0

I still get an error saying "OA-00929: Invalid relational operator".
What's wrong with my query and how should I compare the date
differences?

Thanks!

--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2008, 09:24 AM
Bricklen
 
Posts: n/a
Default Re: data comparision in Oracle

Try it again after removing that ")" trailing the word sysdate

abjiang wrote:
>
> I noticed that the date format is wrong. I've changed the query to
>
> select * from tableA where to_date(substr(errinfo$datetime, 1,
> 19),'yyyy-mm-dd hh24:mi:ss') - sysdate)<0
>
> I still get an error saying "OA-00929: Invalid relational operator".
> What's wrong with my query and how should I compare the date
> differences?
>
> Thanks!
>
> --
> Posted via http://dbforums.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:08 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com