Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Losing Precision while reading from QVD

All,

I am performing below steps but losing precision.

I have a column ,say, ID having high precision sixteen digit number 1999999999999999 in a very large data set .

1. Firstly I would load the large data set into a qlikview table,say,TEST: and then store it into a qvd ,say,sample_temp.qvd. This loads from a oracle DB using select statement.

2. Next,I would drop the qlikview internal table TEST after loading and storing in the QVD. When I see the ID column here (before dropping the qlikview table) the precision stays solid.

3.Now, as said above,after dropping the TEST table , I use a qlikview query having transformations,joins and where clause to store them in to a another qlikview internal table TEST1 and in turn to a QVD say,sample.qvd.

Here the actual problem surfaces. The ID column is converted into an exponential number like 1.99999999999999e+15

Code example

TEST:

SELECT ID,AMOUNT FROM SALES :

STORE TEST INTO SAMPLE_TEMP.QVD;

DROP TABLE TEST:

(Precision stays solid until here)

TEST1:

LOAD ID ,AMOUNT,<SOME TRANSFORMATION ON COLS> FROM SAMPLE_TEMP.QVD(qvd);

When you put  table box on TEST1, I lose the precision on ID column and it shows like 1.99999999999999e+15

Why is this happening ? Am I missing something here ?

Please help !

Tags (1)
6 Replies
Employee
Employee

Re: Losing Precision while reading from QVD

1.99999999999999e+15 means 1,99 * 10^15 it seems correct

Please apply NUM() formatting and check what happens

Not applicable

Re: Losing Precision while reading from QVD

Yes. But I want to display as 1999999999999999  after all these steps.

To be precise 900000000000270 changes  to 9.0000000000003e+015. I dont want an exponential form.

Not sure why it changes to a exponential form.

Employee
Employee

Re: Losing Precision while reading from QVD

What happens if you use num(1999999999999999,'################')?

Employee
Employee

Re: Losing Precision while reading from QVD

I wish this could be my Account Balance

Not applicable

Re: Losing Precision while reading from QVD

Strange thing is,if I comment DROP TABLE TEST: and run the entire script the precision stays as 900000000000270.

num(1999999999999999,'################')? : This did not work.

Employee
Employee

Re: Losing Precision while reading from QVD

TEST:

SELECT ID,num(AMOUNT,'################')) FROM SALES :

Community Browser