Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Specific fields causing 1% of rows to not load in a SQL Select QVD load

In the Sql select load statement below, if I uncomment "PART_NO,
800+ fewer rows out of 180,000 are found. Does anyone else have this sort of problem where
certain fields are causing a few rows to not load?
Does anyone have any suggestions for troubleshooting or correcting incomplete SQL loads?

OrderLines:

LOAD

//"PART_NO" AS OrderLines_ItemNbr,

"MCODE" AS OrderLines_MfgCode,

"ORDER_NO" AS OrderLines_OrderNbr,

"LINE" AS OrderLines_OrderLineNbr

SQL SELECT

//"PART_NO",

"MCODE",

"ORDER_NO",

"LINE"

FROM "ORDER_LINE";

STORE OrderLines INTO [UV_OrderLines.qvd];

13 Replies
Not applicable

Specific fields causing 1% of rows to not load in a SQL Select QVD load

Is the PART_NO Field null in some rows ?

mov
Esteemed Contributor III

Specific fields causing 1% of rows to not load in a SQL Select QVD load

Assuming that the "LINE" field is the unique record identifier (key), I don't see how that commented line can make a difference. What bothers me is the absence of ";" before "SQL SELECT"... Hope it's a mistyping here.
Wonderining how you define the number of rows in the result. What happens if you ran the same query directly in the database, with and without PART_NO? Waht changes if you add DISTINCT?

Not applicable

Specific fields causing 1% of rows to not load in a SQL Select QVD load

Only 35 rows are null.

mov
Esteemed Contributor III

Specific fields causing 1% of rows to not load in a SQL Select QVD load

I doubt that nulls should make any difference in this field, unless thay are in the key field - that must not be null by definition anyway.

Not applicable

Specific fields causing 1% of rows to not load in a SQL Select QVD load

I just edited the script for this forum. ( The semicolon is there)
The rows have a unique id and my dba says he is seeing the higher count with the part_no field.
I can see the missing rows and part_no when I go into the app.
I will ask my dba to run the query with and without DISTINCT directly in the database.









mov
Esteemed Contributor III

Specific fields causing 1% of rows to not load in a SQL Select QVD load

Well, the "I can see the missing rows and part_no when I go into the app" means that nothing is missing(?) Maybe you have all the data after all, just some rows are identical.
Let's see if the DISTINCT changes anything.

mov
Esteemed Contributor III

Specific fields causing 1% of rows to not load in a SQL Select QVD load

One more thing to check - do you have a load statemant in the script that has suffix INNER, and contains the field PART_NO? If yes - see online help about INNER.

MVP
MVP

Specific fields causing 1% of rows to not load in a SQL Select QVD load

Is ORDER_LINE a table or a view?

If it's a view with a join I could imaging different results depending on which columns are used.

Not applicable

Specific fields causing 1% of rows to not load in a SQL Select QVD load

I don't have an INNER suffix.

Community Browser