Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fraction to integer settings in Qlikview

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.

Labels (1)
3 Replies
sunny_talwar

May be use like this

LOAD Year(DATE) as CURR_YEAR;

SELECT SYSDATE AS DATE

FROM DUAL;

neha_shirsath
Specialist
Specialist

Check the default set variables in Edit script  at the beginning.

arvind_patil
Partner - Specialist III
Partner - Specialist III

HI Ajitha,

please check below things in script:

Money.png

Thanks,

Arvind Patil