Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
alerse
New Contributor II

Big numbers not loading as numbers

Hi

I've got a very strange problem. One of my data sources have quite a large number in it, lets call it longNum (10735136080000000.000000). My load script is this: (precision can be anything from 0 to 9)

if(precision = 0,longNum,longNum/(pow(10,precision))) as field1,

In QlikView field1 is now empty... Any idea how to fix this? I can bring in the field as a string but as soon as I try to do the division it breaks again.

Your help will be appreciated!!

1 Solution

Accepted Solutions
MVP
MVP

Re: Big numbers not loading as numbers

You are right, the calculation of newValue seems to be incorrect with regard to adding the right / mid part.

Change the part using the mid function to

mid(floorlongnum,11)

(before, we started with 10, that duplicated the value).

Regards,

Stefan

19 Replies
MVP
MVP

Big numbers not loading as numbers

Hi,

I think there ist a comma missing between the two paths inside the if-function.

Just a typo in the posting?

Stefan

alerse
New Contributor II

Big numbers not loading as numbers

Hi Stefan

Yes, sorry, just a typo in the post.

MVP
MVP

Big numbers not loading as numbers

Is your longnum field aufgefüllt recognized as

numerical data type by QlikView?

Are you using an Oracle DB ?

Try using num#() resp. num() functions to parse in resp. format numerical values.

Stefan

MVP
MVP

Big numbers not loading as numbers

Sorry, it was meant to be "successfully recognized"

This auto correction Is killing me ...

alerse
New Contributor II

Re: Big numbers not loading as numbers

no problem

Ive tried that, it still passes it as a string to qlikview... My source is a normal comma seperated text file.

I will upload the document now...

alerse
New Contributor II

Re: Big numbers not loading as numbers

ok, after some further investigation it looks like QlikView converts any number with more than 14 characters into text... Still no solution yet on how to get it numeric.

Not applicable

Big numbers not loading as numbers

Hi alerse,

I add a preceding LOAD to your script and lost these four larger values without any (error-)message.

LOAD

    precision,

    longnum,

    longnum * 1        AS lostnum1,

    num(longnum)    AS lostnum

    ;

Is it a bug or a feature ?

Roland

chauhans85
Esteemed Contributor

Re: Big numbers not loading as numbers

see the attached file

hope this helps

alerse
New Contributor II

Re: Big numbers not loading as numbers

Hi Sunil

Thanks for your help. UNfortunately that didnt work... If you just look at your new field it looks ok but if you bring in the longnum field you'll see we're missing the 4 long numbers...

Community Browser