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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dimak123
Partner - Contributor III
Partner - Contributor III

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
jonathandienst
Partner - Champion III
Partner - Champion III

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

View solution in original post

16 Replies
Not applicable

try it once in  text object

by using same expression

=len(INVENCOLORID)

dimak123
Partner - Contributor III
Partner - Contributor III
Author

Untitled.jpg

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try num(Field, '0000')


talk is cheap, supply exceeds demand
tamilarasu
Champion
Champion

Hi Dima,

Paste the code above the sql statement.

Load *,

Num(Field) as New;

dimak123
Partner - Contributor III
Partner - Contributor III
Author

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

dimak123
Partner - Contributor III
Partner - Contributor III
Author

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

raghvendrasingh
Creator II
Creator II

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;

jonathandienst
Partner - Champion III
Partner - Champion III

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
Partner - Contributor III
Partner - Contributor III
Author

still the same