Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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];
Is the PART_NO Field null in some rows ?
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?
Only 35 rows are null.
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.
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.
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.
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.
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.
I don't have an INNER suffix.