Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Morning fellow Qlikers,
I'm trying to load some data directly from my MSAccess DB - I'd like to only load the data that falls in between two dates, I have the following in the where clause but it keeps crashing and I'm not sure why:
WHERE CRDATE >= '01/02/2013' AND <='28/02/2013' AND RIGHT(INXFLD01,1)='F';
Can anyone help me understand where I'm going wrong please?
WHERE CRDATE >= '01/02/2013' AND CRDATE<='28/02/2013' AND RIGHT(INXFLD01,1)='F';
Here for comparing date two times, you should write field name two times. Otherwise it will give syntax error.
WHERE CRDATE >= '01/02/2013' AND CRDATE<='28/02/2013' AND RIGHT(INXFLD01,1)='F';
Sorry about that chaps, looks like it didn't paste in properly...in my script I HAVE named the field twice and it's still not working.
Could you find where exactly you are getting error?
This is the error it's returning:
This might due to if date is not in a valid range.Please check you have value within the range that you have specified and also the timestamp format
WHERE CRDATE >= DATE('01/02/2013','DD/MM/YYYY')
AND CRDATE<= DATE('28/02/2013','DD/MM/YYYY')
AND RIGHT(INXFLD01,1)='F';
Hi
It looks like the Access database has dates in a format different to what you are using (probably M/D/Y format). Comparing a date field to a string requires the string to be converted into a date and the conversion will attempt to use the date format used in the database (or the default date format for the PC set in the control panel)
Hope that helps
Jonathan
Thanks for all the help everyone, I'm still having odd issues though.
Even though te query is now pulling data back, it seems to be ignoring the criteria and bringing back everything for the year?!!
Any ideas?