Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text() function in LOAD returns Scientific Notation

I am loading a column using the Text() function.  The column contains integers.  But when I use the Text() function in the Load, the result is displayed as scientific notation (for example:  5.9489797e+008).

LOAD

     Text(FIELDNAME)  As [New Field Name]

RESIDENT  TableName;

If (after the Load), I create a straight table and evalute the same field using an identical Text() expression, it evalutes just fine (not e-notation).

Any ideas on why the Text() function in the LOAD evaluates to e-Notation?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Hi,

I am not really into the internals, just guessing that the internal representation as read from the data source differs from the standard representation after load (the standard which you can set in the beginning of your script as default representations).

Have you tried formatting the number first?

like

Text(num(FIELDNAME,'FORMATCODE')) as ...

Regards,

Stefan

View solution in original post

2 Replies
swuehl
MVP
MVP

Hi,

I am not really into the internals, just guessing that the internal representation as read from the data source differs from the standard representation after load (the standard which you can set in the beginning of your script as default representations).

Have you tried formatting the number first?

like

Text(num(FIELDNAME,'FORMATCODE')) as ...

Regards,

Stefan

Not applicable
Author

Thanks so much, Stefan.

I'm not sure why this was occurring (these are essentially int values loaded from a SQL Server table to a qvd, then loaded from that qvd and joined, etc. here), but formatting via NUM() inside the Text() function seemed to do the trick.