Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
how to compare the records of two similar qvds(Table with 130 filelds of Same Name in each qvd ), when there is no Primary key
Is it possible to compare these stuff.
John
what do you mean by compare ?
are you referring to the content itself or the number of rows, fields, etc ... ?
if you want to identify if they are any missing rows from each other then you need to identify a key field and you could apply where exists or joins
I'd suggest loading both tables using QUALIFY (to avoid linking on all fields) while adding a new field with the row number.
Then, you can compare row by row.
Alternatively, you can UNQUALIFY the combination of fields that you want to compare by (for example, Product, Customer, and Date), and compare other fields based on the matching combinations of your key fields.
You'd need to quality and unqualify different sets of fields, depending on the needs of your comparison.
best,
Oleg Troyansky
QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense
You can create a primary key by using Autonumberhash where you include the fields that make your records unique e.g.
autonumberhash128(EventDate, Description);
From the help
autonumberhash128(expression {, expression})
Calculates a 128-bit hash of the combined input expression values and the returns a unique integer value for each distinct hash value encountered during the script execution. This function can be used e.g. for creating a compact memory representation of a complex key.
Example:
autonumberhash128 ( Region, Year, Month )
Actually if you do a load script a join on the common fields (which is automatic in QlikView) should reveal the differences and similarities between the tables.