5 Replies Latest reply: Aug 8, 2017 12:45 AM by Jo Tedesco RSS

    help with dates in SQL

    Jo Tedesco

      Re: Help with Sql Where Date >

      Hi All

      I have looked at the discussion above but I need help to do the following:

       

      Below is the current script to get the dates I am interested in - however what I want is not to hard code the ScheduledDate.  I would like to change  ScheduledDate < '2017-09-01'

      and make it  ScheduledDate < today() + 30

       

      Is this possible given that 'today() + 30' is is qlikview but it is part of an SQL select?

       

      Thank you

      Jo

       

      aaa:

      SQL SELECT *

      FROM Cccc.dbo.[vwdr_ppDays]

        where ScheduledDate >= '2016-01-01' and ScheduledDate < '2017-09-01'

      ;

      STORE

      aaa INTO

       

      [aaa.qvd] (qvd);

      drop table aaa;