Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

Is the PART_NO Field null in some rows ?

Anonymous
Not applicable
Author

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
Author

Only 35 rows are null.

Anonymous
Not applicable
Author

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
Author

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.









Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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.

rbecher
MVP
MVP

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.

Astrato.io Head of R&D
Not applicable
Author

I don't have an INNER suffix.