Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I am using below composite key but it is taking lot of time.
AutoNumberHash256(field1,field2,field3,field4,field5,field6,field7,field8,field9) as key
Please suggest is there any way to create key instead of above.
-Priya
Hi Priya,
May be as variant
field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9 as key
Regards,
Andrey
U can try
AutoNumber (field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9) as KEY
From the QV Help file, which should be your first option:
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.
autonumberhash128 ( Region, Year, Month )
Calculates a 256-bit hash of the combined input expression values and 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. This function is only available as a script function.
Autonumberhash256 ( Region, Year, Month )
Pria how are you?
You can create:
field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9 as key
AutoNumberHash256(field1,field2,field3,field4,field5,field6,field7,field8,field9) as key
AutoNumber (field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9) as KEY
Any of this will be create a key, but is more efficient us AUTONUMBER
Using this way, you will save a bit of memory.
AutonumberHash creates unique hashed numbers, however they are not sequential integers, therefore the memory savings will be substantially lower.
Hope Help