1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

ORACLE SQL Query to filter results for Date = "the date seven days ago."

Discussion in 'SQL PL/SQL' started by mahalaxminanya, Jul 12, 2010.

  1. Hi,

    I am trying to generate reports on OBIEE for which I may have to write a SQL query for the filter. The Filter must generate results for Data ="the date seven days ago" at any point of time. Kindly let me know if there is a solution to do that.


    Mahi
     
  2. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    how about SYSDATE-7
     
  3. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    Or else show us what did you try so far ?
     
  4. ashishb01

    ashishb01 Active Member

    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    110
    agree to sadik,

    but ensure you use TRUNC(SYSDATE)-7 to get rid of the time format.. else if the user runs the report on 17th Jan 11.55 am, you will see the records from 10th jan 11.55 am ...... that way you will loose half a days data