Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Posts
    276

    Unanswered: ETL for last 2 months data

    Hi All,

    I'm running an ETL every night and each time the ETL runs, it has to load data for the last two months only.

    How can I acheive this?

    I can write something like this for the last 60 days data. But I need to be more specific for months which have 30, 31 days and also Feb.

    Select sysdate-60 from dual;
    Last edited by nandinir; 04-16-07 at 11:33.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking


    Try:
    Code:
    Select * From MyTable
      Where TheDate >= ADD_MONTHS(TRUNC(SYSDATE),-2)

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jul 2005
    Posts
    276
    Thanks so much. I got it and I implemented it too.

Posting Permissions

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