Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

load problem

I load the data as following :

LOAD * Inline [

YYMM, GOBNO, QTY

201401, 099255, 10

201401 ,99266, 20

201401, 99255 ,30

201401, 099266, 40

];

the result is as following :

GOBNOQTYYYMM
09925510201401
09925530201401
9926620201401
9926640201401

this problem is GOBNO have been changed only two value .The GOBNO should have 4 values . why ? 

Tags (2)
1 Solution

Accepted Solutions
michael_gardner
Contributor III

Re: load problem

This is a rare example and I'm not DB Admin but the GOBNO field seems to be an odd way to store an ID.  Typically you do not have to set the data format.  Although you should always check the data model when it is loaded to make sure you get the expected results.

See the below blog for why QlikView handles data the way it does:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/11/13/dual

5 Replies
michael_gardner
Contributor III

Re: load problem

Change GOBNO to Text

LOAD

YYMM,

TEXT(GOBNO) as GOBNO,

QTY

Inline [

YYMM, GOBNO, QTY

201401, 099255, 10

201401 ,99266, 20

201401, 99255 ,30

201401, 099266, 40

];

Not applicable

Re: load problem

I know it is a method at this situation. It still is a problem when I use SQL SELECT FROM database because I don't know the fields value as the following .-----   Should  I  set every fields use text ?

YYMMGOBNOQTY
20140109925510
2014019926620
2014019925530
20140109926640
201401AX9925640
michael_gardner
Contributor III

Re: load problem

QlikView will display the first value it comes across first.  So in the first example in your application it came across 099255 so it is displaying that integer in the model and it came across 99266 first so it is displaying that integer in the model.

If 099255 and 99255 are intended to be to separate id's than Text() function is perfectly fine. 

Not applicable

Re: load problem

This means:   I must set the data format when I load the data first from any sources  like this kind of ID number . 

michael_gardner
Contributor III

Re: load problem

This is a rare example and I'm not DB Admin but the GOBNO field seems to be an odd way to store an ID.  Typically you do not have to set the data format.  Although you should always check the data model when it is loaded to make sure you get the expected results.

See the below blog for why QlikView handles data the way it does:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/11/13/dual