Results 1 to 5 of 5

Thread: oracle query

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    oracle query

    I have ORacle 9i database. With vb6 I am firing the query-
    select * from woc_mas
    (woc_dt is date type)
    it is returning all the records. but on writing the query-
    select * from woc_mas where woc_dt > '01/01/2005'
    no records returns

    suggest how to query with date field

  2. #2
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: oracle query

    i think, by the looks of it, u should use the dd/mmm/yyyy format
    try
    VB Code:
    1. select * from woc_mas where woc_dt > '01/jan/2005'

  3. #3
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: oracle query

    Try this:
    select * from woc_mas where woc_dt > to_date('01/01/2005', 'dd-mm-yyyy')
    Frans

  4. #4
    Junior Member
    Join Date
    Dec 2005
    Location
    Surat,India
    Posts
    29

    Re: oracle query

    hi

    Format your date as per your database date formate
    Virendrasinh Narendrasinh Mahida
    ----------------------------------
    There is Never a WRONG time to do the RIGHT Thing

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: oracle query

    Moved to database development.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width