Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using below Query to get the current year and taking that into let variable and passing the let variable in sql Queries where ever required.
LOAD CURRENT_YEAR AS CURR_YEAR;
SELECT TO_NUMBER(TO_CHAR((SYSDATE-7),'IYYY')) CURRENT_YEAR
FROM DUAL;
Let vCURR_YEAR = Peek('CURR_YEAR');
But the CURR_YEAR variable is converting to fraction with many zeroes followed after decimal point.
ex:2017.0000000000000000000000
Me and my client using the same version of Qlikview 11.
For me it doesn't create any problem the CURR_YEAR variable gives me as 2017 and my script works and give data.
But for my client it is converting as 2017.0000000000000000000000
Is it any settings problem in Qlikview?
Kindly help me in figuring out this.
May be use like this
LOAD Year(DATE) as CURR_YEAR;
SELECT SYSDATE AS DATE
FROM DUAL;
Check the default set variables in Edit script at the beginning.
HI Ajitha,
please check below things in script:

Thanks,
Arvind Patil