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: 
Not applicable

Load field with ODBC Drivers

Hello,

When i load the field NOCLI Customer Number (Alphanuméric Value) from Db2. QV automaticaly Add Zeros Before.

Db2 : Field Value '000001' -> QV Field Value ='000001'

Db2 : Field Value '1bbbbb' -> QV Field Value ='000001' (Where b=blanck)

The 2 Db2 Field are différent but in QV there are equal = Problem

Is there any way that QV don't add the Zeros Before. (Force the fied to load in AlphaNuméric Value) ?

Thanks

10 Replies
Not applicable
Author

Did you check if you have this kind of options in your ODBC Driver settings ?

GabrielAraya
Employee
Employee

Hi, Did you try with the Evaluate() function? Sometimes the ODBC return a numeric field with zeros.
Could you try:
Load
Evaluate(field) as field,
:
;

SQL Select ......;
Gabriel

Not applicable
Author

When i look in the result of the odbc drivers. The result is good

One field with '1bbbbb' and one with '000001'. It seem becoming from QV

Not applicable
Author

I try to use the function text() in the load statement and it seem to be good.

Thanks

Not applicable
Author

Text() Fonction works well, but in our application we use a lot of Alphanuméric field with numeric value in it. (All key field)

And finaly this is a problem everywhere

Is it possible to disable this fonction for all the server or all the document in QV ?

Don't undersand why QV dont respect the import value and transform it.

Not applicable
Author

When Qlikview stores information, it doesn't really force their type.

If all your alphanumeric fields contains numbers, Qlikview will handle them as numeric.

There is no way to force key fields to be taken as characters. Except by adding TEXT as mentionned earlier. But is it really an issue ? I mean if all keys are in the same shape, then you just have to add Text function before or add string : '' &" Fieldname as Fieldname for example LOAD '' & MyField as MyField, this should work also...

Rgds,

Not applicable
Author

Try to use this syntax. But i have always a script error

[ACLIENP1]:
LOAD
"&" NOCLI as NOCLI,
*;
SQL SELECT
// ETCLE,
// USCLE,
// DCLCS,
// DCLCA,
// DCLCM,
// DCLCJ,
// WSCLR,
// DCLMS,
// DCLMA,
// DCLMM,
// DCLMJ,
NOCLI,

NMCLI,

FROM $(vSysteme).$(vBibliothequeBASECOM).ACLIENP1;
STORE * FROM [ACLIENP1] INTO $(vAdherentRadical)\ACLIENP1.QVD;
DROP TABLE [ACLIENP1];

Not applicable
Author

I would do:

[ACLIENP1]:
LOAD
'' & NOCLI as NOCLI,
*;
SQL SELECT
// ETCLE,
// USCLE,
// DCLCS,
// DCLCA,
// DCLCM,
// DCLCJ,
// WSCLR,
// DCLMS,
// DCLMA,
// DCLMM,
// DCLMJ,
NOCLI,

NMCLI,

Not applicable
Author

I would rather do:

[ACLIENP1]:
LOAD
'' & NOCLI as "%NOCLI",
*;
SQL SELECT
// ETCLE,
// USCLE,
// DCLCS,
// DCLCA,
// DCLCM,
// DCLCJ,
// WSCLR,
// DCLMS,
// DCLMA,
// DCLMM,
// DCLMJ,
NOCLI,

NMCLI,