Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Load only from perticular month

hi all

i have data from jan 2018 in my data base    but I wan to load only from may 1st -2018

My date

createdDate = 4/30/2018  7:39:24 PM

how to load  only from may?  what is the where condition?

Thanks

Sony

15 Replies
Colin-Albert

The functions are all QlikView functions.

These will be applied in the qlikview load script before the query is passed to the SQL engine.

sudhirpkuwar
Partner - Creator II
Partner - Creator II

What exactly you want

soniasweety
Master
Master
Author

am loading the table from data base to  qlik

LOAD ID,

CreatedDate;

sql select

ID,

CreatedDate;

here I need to write the where condtion to get the data >April Month 2018

Colin-Albert

Try this

LOAD ID,

CreatedDate;

sql select

ID,

CreatedDate

where createdDate >= date(floor(monthstart(addmonths(today(), -3))))

;

wilsonwebb
Partner - Contributor III
Partner - Contributor III

Is this what you need Sony? Please be mindful of where you put your semicolon.

LOAD ID,
CreatedDate;
sql select
ID,
CreatedDate

FROM DBTABLE

WHERE CreatedDate > '4/30/2018';

Colin-Albert

This should work by setting the date as a variable CDate formatted as YYYY-MM-DD and using that date in the where clause.

Let CDate = date(monthstart(addmonths(today(), -3)), 'YYYY-MM-DD') ;

LOAD

     ID,

     CreatedDate;

sql select

     ID,

     CreatedDate

where createdDate >= '$(CDate)'

;