Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

retko1985
Contributor II

Basic Load from CSV lead to incorect data, problem with leading zeros

Hello,

please see attachments,

here is my csv:

Notice that Country CH has 0002, but Country NL has 2 (not 0002).

After load I get:

Drives me a little nuts

Can someone help me please?

Thanks

1 Solution

Accepted Solutions
Frank_Hartmann
Honored Contributor II

Re: Basic Load from CSV lead to incorect data, problem with leading zeros

try this:

Directory;

LOAD A1,

     B1,

     text(C1) as C1

FROM

C:\Users\admin\Desktop\Zeros1.csv

(txt, utf8, embedded labels, delimiter is ',', msq);

View solution in original post

2 Replies
Frank_Hartmann
Honored Contributor II

Re: Basic Load from CSV lead to incorect data, problem with leading zeros

try this:

Directory;

LOAD A1,

     B1,

     text(C1) as C1

FROM

C:\Users\admin\Desktop\Zeros1.csv

(txt, utf8, embedded labels, delimiter is ',', msq);

View solution in original post

Highlighted
stabben23
Honored Contributor

Re: Basic Load from CSV lead to incorect data, problem with leading zeros

Hi,

this is not related to csv, its Qlikview Standard.

Qlikview remember the first read format, here 0002, then when 2 is read, Qlikview is so "smart" that he "convert" this to 0002. If you read 2 first, then CH value will get 2 also, try if you dont belive

So if you do as Frank mention, then It will Works for you.