Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm very new at using Qlikview for our medical office to analyze medical data. I am able to pull in dates from our sql database however, I am not sure how to condense the year to only pull records > 1/1/2014. Right now the data goes as far back as 1995 and is to much info to load.
Here are the table I'm using..
LOAD HDID,
OBSDATE,
Year (OBSDATE) as OBSYear,
Month (OBSDATE) as OBSMonth,
Weekday (OBSDATE) as OBSWeekDay,
Day (OBSDATE) as OBSDay,
Hour (OBSDATE) as OBSHour,
OBSTYPE,
OBSVALUE,
PID;
SQL SELECT HDID,
OBSDATE,
OBSTYPE,
OBSVALUE,
PID
FROM xxx.xxx.OBS;
What is the best way to write this statement?
Hi Nathan, try to add to SQL select statemet a Where clause to filter OBSDATE:
SQL SELECT HDID,
OBSDATE,
OBSTYPE,
OBSVALUE,
PID
FROM xxx.xxx.OBS WHERE OBSDATE>='01/01/2014';
Dates can be tricky and depending of the database source, the conditions the compare dates can differ.
do you want records starting in 2014?
if yes and your database is sql server and OBSDATE is a datetime just add the bold
SQL SELECT HDID,
OBSDATE,
OBSTYPE,
OBSVALUE,
PID
FROM xxx.xxx.OBS
WHERE year(OBSDATE) >= 2014
;
Hi Nathan, try to add to SQL select statemet a Where clause to filter OBSDATE:
SQL SELECT HDID,
OBSDATE,
OBSTYPE,
OBSVALUE,
PID
FROM xxx.xxx.OBS WHERE OBSDATE>='01/01/2014';
Dates can be tricky and depending of the database source, the conditions the compare dates can differ.
Great thank you!