Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I've experienced very, very strange situation as the SQL experienced employee.
So after Left Joining two tables, I've got less rows on the output...
For many reasons it can be more rows due to duplicates etc., but it shouldn't be less rows.
What are the possible reasons and the solutions for that critical issue?
The keys are generated via Autonumber() and it has the same seed, furthermore I haven't got the NULLs on these fields.
I'll try to prepare the file and the script.
27-3-2017 16:41:31: 0030 Binary [..\XXX.qvw]
27-3-2017 16:41:51: 0031 Let vNumberOfRows = NoOfRows('FINAL')
27-3-2017 16:41:51: 0032 Trace 4877810
27-3-2017 16:41:51: 0032 4877810
27-3-2017 16:41:51: 0033 Left JOIN(FINAL)
27-3-2017 16:41:51: 0034 LOAD Distinct * RESIDENT D_XXX
27-3-2017 16:41:51: 11 fields found: %XXX.KEY, XXX.Name 4 516 lines fetched
27-3-2017 16:41:51: Joining/Keeping
27-3-2017 16:42:08: 0035 Drop Table D_XXX
27-3-2017 16:42:09: 0036 Let vNumberOfRows = NoOfRows('FINAL')
27-3-2017 16:42:09: 0037 Trace 4219022
27-3-2017 16:42:09: 0037 4219022
Kind Regards,
Adam
Yes - it seems that it is an all or nothing thing.
Your sample script with the preceding load - DISTINCT is ignored:
And without the preceding load - DISTINCT propagates:
Exactly.
I knew that your suggestion to use a RESIDENT table was the more reliable one. It still stands.
At least you got 10 virtual points from me