SAND CDBMS Tools Reference Guide
NDL++ Functions:
Syntax and Examples

Return to String Function Index


String Function Syntax and Examples


The GENKEY() function returns a 19-character string that is unique for each unique input set, unless one of the referenced fields is NULL, in which case a null value is returned. Note that the same combination of input field values will return the same output string, so the GENKEY() function will not produce a true primary key unless the input fields are known to be collectively unique.

The key produced with the same input set can differ between operating systems, which might affect the cross-platform portability of data and/or scripts.


GENKEY( arg1 [ {, argN} ... ] )


The argument(s) can be any referenced field in the script. Up to ten arguments (arg1, arg2, ..., arg10) can be included. The returned key will be unique for each unique, NOT NULL combination of fields specified. If any one input field is NULL, a null value will be returned instead.


input: first-name,last-name,employee-number

 IMPORT @sample.dat

field1 *,
field2 *,
field3 *\r\n
col1 GENKEY(field1, field2, field3)
col2 field1
col3 field2
col4 field3



schema1.table1.col1 unique string
schema1.table1.col2 first-name
schema1.table1.col3  last-name
schema1.table1.col4  employee-number


Return to String Function Index