Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning QV Experts!
I'm trying to find in which order records are loaded into table by using "RecNo()".
When I put "RecNo()" as comment I have about 5000 rows which is correct.
Base:
load
ListNr,
OrderPoItem,
Planned_Res,
PO_DeliveryDate
//RecNo() <-- as comment
Resident MDTB
Order By ListNr asc,ListPos asc;
When I delete comment I have over 22 milions rows which is not correct.
Base:
load
ListNr,
OrderPoItem,
Planned_Res,
PO_DeliveryDate,
RecNo()
Resident MDTB
Order By ListNr asc,ListPos asc;
drop Table MDTB;
Do you know why numbers of rows increased?
Thanks in advence!
Not sure what you mean by number of rows increased, a RESIDENT load will take, if there is no WHERE clause of any type, all the rows from the previous table.
Do the Base and MDTB have the same fields? If so, the RESIDENT load is incrementing the rows in the MDTB table, and the Base table will be automatically concatenated to the previous one (MDTB). Maybe that's why the number increases?
Also, if you are using RecNo() without "AS" in any other table, which is technically possible, you are associating those two tables.
See about RecNo() and RowNo() here https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/CounterFunctio...
Hi,
you had probably made a bad join with synthetic key that duplicates your rows.
Try using the "AS" clause as Miguel suggests.
where do you read the number of rows 5000 vs. 22million from (table viewer / status bar)?
Hi,
There, after loading script and insert table.
Thanks Miguel,
As you said, synthetic key caused that issue.
Problem solved.
Thanks Miguel,
As you said, synthetic key caused that issue.
Problem solved.
Glad it worked. Thanks for letting us know