Problems querying oracle db from Access 2000

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jhweb

    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
  • hrishy

    #2
    Re: Problems querying oracle db from Access 2000

    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

    Comment

    • Guido Konsolke

      #3
      Re: Problems querying oracle db from Access 2000

      Hi,

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

      "hrishy" <hrishys@yahoo. co.ukschrieb im Newsbeitrag
      news:4ef2a838.0 308042058.48d13 a8c@posting.goo gle.com...
      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


      Comment

      • Shawn

        #4
        Re: Problems querying oracle db from Access 2000

        jhweb <member34971@db forums.comwrote in message news:<3200808.1 060040656@dbfor ums.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.


        Comment

        Working...