Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

dimak123
New Contributor II

Added zeros to field

Hi to all

Need help, somehow i am getting field on layout different from original data.

How can i show the exact field?

Capture1.JPGCapture2.JPG

1 Solution

Accepted Solutions
MVP
MVP

Re: Added zeros to field

Do you want to preserve the exact number of leading zeroes? Then do this:

LOAD text(Field) As Field,

     Length;

SQL SELECT

     Len(..... rest of your SQL expression ....

;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
16 Replies
Not applicable

Re: Added zeros to field

try it once in  text object

by using same expression

=len(INVENCOLORID)

dimak123
New Contributor II

Re: Added zeros to field

Untitled.jpg

Re: Added zeros to field

Try num(Field, '0000')


talk is cheap, supply exceeds demand

Re: Added zeros to field

Hi Dima,

Paste the code above the sql statement.

Load *,

Num(Field) as New;

dimak123
New Contributor II

Re: Added zeros to field

Num' is not a recognized built-in function name.

dimak123
New Contributor II

Re: Added zeros to field

SQL##f - SqlState: 37000, ErrorCode: 195, ErrorMsg: [Microsoft][ODBC SQL Server Driver][SQL Server]'Num' is not a recognized built-in function name.

SQL SELECT

    len(INVENTCOLORID) as Length,

    INVENTCOLORID as Field,

    Num(INVENTCOLORID) as New

FROM

raghvendra_singh
Contributor II

Re: Added zeros to field

Try this:

Tab1:

SQL SELECT

      len(INVENTCOLORID) as length,

     INVENTCOLORID as Field

from "DNA_PROD".dbo.NAOTMOBILEITEMS;


noconcatenate

Tab2:

Load length,

     text(Field) as Field

resident Tab1;

Drop tab Tab1;

MVP
MVP

Re: Added zeros to field

Do you want to preserve the exact number of leading zeroes? Then do this:

LOAD text(Field) As Field,

     Length;

SQL SELECT

     Len(..... rest of your SQL expression ....

;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dimak123
New Contributor II

Re: Added zeros to field

still the same

Community Browser