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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Removing useless zero in number

Hi everybody

I have a problem in qv server 11! I have a lot of number(both of real and float) in a qv document. but when I reload, I see a lot of zero after the real number! for example I have a field that contains 800,801,802,............. after ending reloading process, the listbox of that display:

800.000000000000000000000000000000000000000000000000000000000000000000000000000

801.000000000000000000000000000000000000000000000000000000000000000000000000000

802.000000000000000000000000000000000000000000000000000000000000000000000000000

Please consider that the number of these kind of fields are not a few and the length of the numbers are different(for example I have 1,800,9241,... in a specified field) and I can't use the function to_char(fieldname,format) for all of them in a similar way! I need a total solution for solving this problem like a set format in one line statement in script that doesn't affect the flaot numbers. I tried changing format in number tab for these fields, but unfortunately after reloading the app, the problem will appear again!

Regards

Reihaneh

8 Replies
sparur
Specialist II
Specialist II

very strange behaviour )

could you provide example of qvw?

Anyway, try to use Num() function for formatting in the script.


Not applicable
Author

Yeah I think so! I didn't have this kind of problem at previous versions

rbecher
MVP
MVP

Hi,

there was a long thread in the past about this issue:

Re: use 'OLEDB CONNECT 64bit oracle happen 1 change 1.00000000000000000000000000000000000

If this is related to a Oracle number type with unspecified precision and scale you could use a CAST:

SELECT cast(COLUMN1 as number(38)) as COLUMN1,

or by using num#( ) function in QlikView.

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
er_mohit
Master II
Master II

try this function

left(fieldname,(Index(fieldname,'.')-1) as Fieldname

Try this in your script

LOAD

Left(F1,Index(F1,'.')-1)as F1;

LOAD * INLINE [

    F1

    1.000000

    2.000000

    800.0000000000

    801.000000000000

   

];

Not applicable
Author

Thank you a lot. It's so helpful but I will want to know if a solution exists to apply for all fields just in one line statement, like a set format at first of code. Cast function should be applied one by one for numeric fields.

Regards

Reihaneh

Not applicable
Author

try simple like this

num(fieldname)

**************************************************

LOAD *, num(x) as num

Inline [

x

2.00000

11.0230000000

5.23000000000

];

nizamsha
Specialist II
Specialist II

Table:

LOAD * Inline [

sales

1.0000

2.0000

3.0000

12345.00000000000000000000000000

123456.00000000000000000000000000

2345678555000,000000000000000000

];

table2:

LOAD

num( sales ,'#,##0') as sales1

Resident Table;

Not applicable
Author

Hi,

Did you get any permanent solution for this problem. Please let me know, I am facing the same kind of issue