Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
GOBNO | QTY | YYMM |
099255 | 10 | 201401 |
099255 | 30 | 201401 |
99266 | 20 | 201401 |
99266 | 40 | 201401 |
this problem is GOBNO have been changed only two value .The GOBNO should have 4 values . why ?
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
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
];
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 ?
YYMM | GOBNO | QTY |
201401 | 099255 | 10 |
201401 | 99266 | 20 |
201401 | 99255 | 30 |
201401 | 099266 | 40 |
201401 | AX99256 | 40 |
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.
This means: I must set the data format when I load the data first from any sources like this kind of ID number .
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