14 Replies Latest reply: May 12, 2017 2:57 PM by Robert Svebeck RSS

    load editor datefield <today()-30 days of data question

    Monica Labrador

      Hi,

       

      I need help writing two where clauses in my statement. I need to load the last 30 days of data into my app.

       

      The first clause indicating the status of finalizing works, but the second statement with date is not working, the data for capture date is in the format mm/dd/yyyy.

       

      LOAD pod,

          `capture_date`,

          `note_status`,

          `note_count`;

      SQL SELECT pod,

          `capture_date`,

          `note_status`,

          `note_count`,

      FROM `ema_dw`.`fact_chart_note_status`

      Where note_status = 'FINALIZING' and capture_date < today()-30;