469,082 Members | 1,091 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,082 developers. It's quick & easy.

Problems querying oracle db from Access 2000


I am trying to query a table in oracle from Access 2000 using the
following criteria.

select * from table1 where DATE_RECEIVED between '1/jan/2003' and
'30/jun/2003'

I am using the Oracle odbc driver.

Records should be returned but nothing.

I have tried using different formats, but nothing works.

I am new to Oracle and need some assistance on this small issue.

Any help is appreciated.

Thanks,

Johann

--
Posted via http://dbforums.com
Jul 19 '05 #1
3 3723
Hi Jhweb

Try this
select * from table1
where
DATE_RECEIVED
between to_date('1/jan/2003','dd-mon-yyyy') and
to_date('30/jun/2003','dd-mon-yyyy')
regards
Hrishy

P.S:If now roes are returned then run the query in sql plus and see
what is happening..If there is a mismtach the odbc driver is doin
somethin funny
Jul 19 '05 #2
Hi,

little correction inside.
I point it out because Johann wrote that
he's new to the Oracle world.

"hrishy" <hr*****@yahoo.co.uk> schrieb im Newsbeitrag
news:4e**************************@posting.google.c om...
Hi Jhweb

Try this
select * from table1
where
DATE_RECEIVED
between to_date('1/jan/2003','dd-mon-yyyy') and
between to_date('1/jan/2003','dd/mon/yyyy') and
to_date('30/jun/2003','dd-mon-yyyy')
to_date('30/jun/2003','dd/mon/yyyy')


regards
Hrishy

P.S:If now roes are returned then run the query in sql plus and see
what is happening..If there is a mismtach the odbc driver is doin
somethin funny


Greetings,
Guido
Jul 19 '05 #3
jhweb <me*********@dbforums.com> wrote in message news:<32****************@dbforums.com>...
I am trying to query a table in oracle from Access 2000 using the
following criteria.

select * from table1 where DATE_RECEIVED between '1/jan/2003' and
'30/jun/2003'

I am using the Oracle odbc driver.

Records should be returned but nothing.

I have tried using different formats, but nothing works.

I am new to Oracle and need some assistance on this small issue.

Any help is appreciated.

Thanks,

Johann


You could do what Guido is saying there, but by nature of the ODBC
from Access to Oracle, you should just type in the date format the way
Access normally takes it. Access will format the date to it's liking,
but when it is sent through the ODBC driver to Oracle the date will be
converted to the Oracle date format. FYI...the Oracle date formate is
'04-AUG-03 12:00:00 AM' for today.

Oracle does it's date format as date / time. It's confusing for new
users...I was in your shoes a little over a year ago.

http://sqlzoo.net/howto/oracletip70465.htm
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Markku Uttula | last post: by
2 posts views Thread by neptune | last post: by
2 posts views Thread by egoldthwait | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.