Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

SQL load data - value changed by QlikView

When loading data from a databases, I have a table with my articles which each have a unique itemno, which is alfa-numerical (character).

In my database, I have an item with itemno "850" and one with itemno "00850".

When loading this into QlikView (qvd files), QlikView loads them both as "00850", and thereby eveyr report based on itemno is wrong.

When i adapt the SQL load statement to say "... where ITEMNO = '850', only 1 item is loaded and displayed as "850", when it says "... where ITEMNO = '00850' also only 1 item is loaded en now displayed as "00850" (correct)

How can I make QlikView load my items correctly, that is, without chaging the value of any field?

Thx,

Yves.

1 Solution

Accepted Solutions
Not applicable

SQL load data - value changed by QlikView

Hi

Try this one

Tab1:

Load FIRMANR, ARTNR, text(ARTNR) as ARTNR_t, GROEP1;

SQL SELECT FIRMANR, ARTNR, GROEP1 FROM PUB.ARTI;

Thanks

Saran.

5 Replies
hector
Valued Contributor

SQL load data - value changed by QlikView

Hi, have you tried the text() function?

Use

Load
*,
text(ITEMNO) as ITEMNO_T
;
SQL
Select from...;

This will keep the leading zeroes of the record.

Rgds

Not applicable

SQL load data - value changed by QlikView

Hi,

I tried now, but I get een error msg then.

This is the SQL statement:

Artikel:

SQL SELECT

FIRMANR,

ARTNR,

text(ARTNR) as ARTNR_t,

GROEP1

FROM PUB.ARTI;



The error is "syntax error in sql statement".

The field i'm having trouble with is "ARTNR"

Regards,

Yves.

Not applicable

SQL load data - value changed by QlikView

Hi

Try this one

Tab1:

Load FIRMANR, ARTNR, text(ARTNR) as ARTNR_t, GROEP1;

SQL SELECT FIRMANR, ARTNR, GROEP1 FROM PUB.ARTI;

Thanks

Saran.

hector
Valued Contributor

SQL load data - value changed by QlikView

try this

Artikel:

Load
FIRMANR,
ARTNR,
text(ARTNR) as ARTNR_t,
GROEP1
;
SQL SELECT
FIRMANR,
ARTNR,
GROEP1
FROM PUB.ARTI;

Text() is a QV function, so it must be placed into a Load statement rgds

Not applicable

SQL load data - value changed by QlikView

Off course.

Thx a lot Saran and Héctor.

Regards,

Yves.