Results 1 to 2 of 2

Thread: get data from yesterday

  1. #1
    Join Date
    Dec 2002
    Posts
    5

    get data from yesterday

    I tried to get out all data from an oracle where the date field is a timestamp.
    This does not work because of the time component in SYSDATE:
    SELECT * FROM table WHERE timestamp_col = SYSDATE - 1;

  2. #2
    Join Date
    Dec 2002
    Posts
    5
    For those interested I got it myself:

    SELECT * FROM table WHERE to_date(timestamp_col, 'DD.MM.YY') = to_date(SYSDATE, 'DD.MM.YY')-1;

Posting Permissions

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