usr_create is an attribute available in usr table which I am trying to load. When user is created, usr_create attribute has the value of it's creation timestamp and i do not want to load data complete table. So please suggest how can I limit the data loaded based on condition like based on creation date.
I have seen that same issue is discussed earlier and couple of options are suggested. I tried all of them but nothing worked.
1. Using Date function in Load statement as shown below:
Where Date(INV_DATE,'M-D-YYYY') > '1-2-2009'
2. Using make date function in Load statement as shown below
Where Date(sold_date) >= MakeDate(2016, 1, 1);
3. Using Set function before Load statement as shown below:
- SET DateFormat='M/D/YYYY';
Where txdate >= '1/1/2010'
SQL SELECT *
4. Using Char function as shown below:
where to_char(usr_create,'DD-MON-YY') = '04-OCT-18'
Only the highlighted on had worked for me. For rest all options I was getting error. Also when I tried replaced the above Loading method with greater than sign it again thrown error.
"where to_char(usr_create,'DD-MON-YY') = '04-OCT-18'"
Please suggest the correct way to load data based on date.
Also suggested where we have to mention the FROM and WHERE clause in the script. Whether it will come in LOAD statement of in SQL /Select statement.
It is really confusing me and help will be appreciated.
Thanks in Advance
Field names in QlikView are case-sensistive. You seem to use lower case names for the upper case named fields so that will not work in QlikView.
You should also check whether the date fields really contain dates as opposed to being text fields that look like they contain dates. You can do that in the Table Viewer or in the Document Properties in the Table tab:
Notice that fields that have "real" dates in them has the tags $timestamp and $date