Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
May be this
aaa:
SQL SELECT *
FROM Cccc.dbo.[vwdr_ppDays]
where ScheduledDate >= '2016-01-01' and ScheduledDate < (SYSDATE + 30);
Let vDate ='Date (Floor (Today ())+30),''YYYY-MM-DD'')'
In the sql where condition,
ScheduledDate<'$(vDate)'
hth
Sasi
Let vDate ='Date(Floor(Today())+30),''YYYY-MM-DD'')';
on using debug this s gives vDate as :"Date(Floor(Today())+30),'YYYY-MM-DD')"
and causes a problem when trying to use it.
Let vDate =Date(Floor(Today())+30); this gives the vDate as 7/09/2017 but then the problem is that it is in the wrong format.
Jo
Try
Let vDate =Date(Floor(Today())+30,'YYYY-MM-DD');
Thank you that worked! Where could I have found information about how to worked with dates as text???