Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Load *;
SQL Select *
from DM.Da
Where monthstart(CreatedDate,'YYYY-MM-DD') >= Date(monthstart(dateadd(month,-10,Today(),'YYYY-MM-DD'));
this statement throws an error, monthstart is not avaible in sql server. How can i load data for past 10 months ?
Hi,
I'm not very good at the sql syntax, but with Qlik engine you can do this:
Load *
where CreatedDate>= AddMonths(Today(), -6);
SQL Select *
from DM.Da;
make sure to evaluate your CreatedDate field on the load and format it the right way.
sir, But the problem of doing it in Load instead of SQL is it's time consuming.
mto
I think some of the functions that you are using here might be Qlik specific functions.... such as Today(), MonthStart... I know Oracle uses SYSDATE for Today() and something like ADD_MONTH for AddMonths and Trunc to get MonthStart... etc... suggest you to talk to your DB guys to give you a way to restrict this to 10 months....
Ya right. I could find equivalent function for Today as GetDate, But for monthstart could not find such match?
Which database are you pulling the data from?
SQl server 2014 Management Studio
Here is for going back