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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Import numeric value as text field in QVD

How can I import a numeric field as a text field in a QVD file ?

For ex. I have a import a field with value "02" and with value "2" . I want to have two values in my QVD .

1 Solution

Accepted Solutions
Not applicable
Author

You can try the function Text() and Num();


LOAD
TEXT(Num(FIELD,'00')) AS FIELD_TEXT
FROM TABLE;


View solution in original post

8 Replies
Not applicable
Author

You can try the function Text() and Num();


LOAD
TEXT(Num(FIELD,'00')) AS FIELD_TEXT
FROM TABLE;


Not applicable
Author

THX for fast reply.

Not applicable
Author

Seems that problem is not solved.

Via ODBC connectie via DB access I get value "2" and "02" . In Qlikview I get only one value "02" ? Even with the TEXT function ?

Why...

Not applicable
Author

Hi

Just use TEXT(Field) Instead.

The num function Num(FIELD, '00')) formats the text representation to 02

Regards

Micke

Not applicable
Author

OK Now its working. It did something wrong. THX.

Why is this not default taking over the right content. Why is Qlikview changing the content of the Progress field "2" in "02" ?

Not applicable
Author

Hi,

The text "2" is different from "02", QlikView interprets the value as text or number.
See the example below, the interpretation of QlikView.


Teste:
LOAD
Text(Field) as Field1,
Field as Field2
INLINE [
Field
02
2
];



Is right-aligned number.
Is left-aligned text.

Not applicable
Author

Ok I understand.

But does this means that for every ALFA FIELD in the external Database, where we have alfa characters together with numbers , that we have to specify TEXT per field for importing into Qlikviewx ?

Is there not a general option to avoid this ?

Not applicable
Author

That's right, to really determine a data type. You must use the functions a Num() and Text().