Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
gfisch13
Creator II
Creator II

Creating a Key with Table Fields

Hi All - we are trying to create a 'key' to use to match two separate tables.  The fields we are using have been imported from an SQL source and renamed prior to creating our key.  We have tried using both the field name that came from the table, and the renamed fields, but are getting error messages on both.

What is the preferred way to create this key?   The key is a string, a date and a number.   Please see the script attached.  Any suggestions would be welcome.

Thanks!

George and John

7 Replies
sunny_talwar

Instead of +, may be you need &

sunny_talwar

Actually you are doing this in SQL... which database are you pulling the data from?

gfisch13
Creator II
Creator II
Author

Pulling the data from an SQL table.  The script is within QV.

maxgro
MVP
MVP

try with field names instead of the alias

"EMPE_ID" + "TRAN_DT" + "TRAN_AMT" as "KEY"

agarwalrits13
Contributor III
Contributor III

If the script is in qlikview then you can also use autonumber in order to join the Keys.

AutoNumber (EMPE_ID,TRAN_DT,TRAN_AMT") as Key .

qlikviewwizard
Master II
Master II

Hi gfisch13,

Can you attach some sample data with 10 rows.

agarwalrits13
Contributor III
Contributor III

If the script is in qlikview then you can also use autonumber in order to join the Keys.

AutoNumberhash128 (EMPE_ID,TRAN_DT,TRAN_AMT) as Key or AutoNumberhash256(EMPE_ID,TRAN_DT,TRAN_AMT) as Key



AutonumberHash process 30% faster than normal autonumber.