Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2012
    Posts
    2

    Unanswered: date is equal to sysdate

    Hello,

    I am trying to write a scrip that queries new email address everyday.

    select email from personal b, cred r where r.award_date = sysdate ;


    When I run this, no records was found.

    Any assistance would be greatly appreciated.

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    sysdate contains a time portion. I'm sure award_date too. Use the trunc() function to remove the time component.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >select email from personal b, cred r where r.award_date = sysdate ;

    statement above will only ever be true for 1 second out of all eternity!
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    try. This will work if award_date has no time element.

    select email from personal b, cred r where r.award_date = trunc(sysdate) ;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Aug 2012
    Posts
    2
    Thanks guys. It worked! Award_date has no time element.

Posting Permissions

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