Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need some example for autonumber128 with output!

Hi

What is the use of autonumberhash128? Can any one explain me with some example.

By the way what is mean by "returns a unique integer value for each distinct hash value" ? Does it mean that it will return unique integer value for Region, Year and Month separately ? Or together it will generate unique value. Please explain the same with example and output as given example is not good enough to understand.

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 )



5 Replies
Not applicable
Author

Look at the examplem attached.

suniljain
Master
Master

autonumberhash128(Region,year,Nonth)

It Generate Indexing based on whatever parameter you set as expression.

suniljain
Master
Master

Expression should be distinct hash value.

Not applicable
Author

Hi Santhosh,

Many thanks for your help. Seeing the document I feel it generates 1 key value for all the expression value combined together. I was just thinking that it will generate key value for each expression field. I got confused as it was not showing any value in the assigned variable as shown below.

SET PKexp=autonumberhash128(stkcode,stkname);


Document attached by you helped me to understand easily.

Not applicable
Author

Hi Sunil,

Thanks for the explanation.