Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    87

    Unanswered: problem with range of smalldatetime

    Hi everybody

    Got this query below that queries a daterange from my database.
    dateenter is small datetime with the where clause it doesn't give me anything but if i use

    select * from tblcompany
    where dateenter > 2003-01-01 and dateenter < 2009-01-01

    no result

    select * from tblcompany
    where dateenter > 2003-01-01

    it gives me everything even if not on the range

    couldn't fine what's wrong...
    thanks for any help

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Code:
    select * from tblcompany
    where dateenter > '2003-01-01'
    Nothing wrong with smalldatetime.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Aug 2006
    Posts
    87
    thanks overlooked the quotes over the dates on the range...and now it's working


    Quote Originally Posted by pootle flump
    Code:
    select * from tblcompany
    where dateenter > '2003-01-01'
    Nothing wrong with smalldatetime.

Posting Permissions

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