[quote=248973:@Dave S]Thats my point… No it does not.
'Walmart Store #124' || '35.50''
'Walmart Store #1' || '2435.50''
Two different stores, two different amounts, two IDENTICAL keys
Using Indexes, and not concatenting values is the only fast/safe way to do it…[/quote]
The statement that you highlighted was taken out of context. In my real app the concatenation does give a unique key. In all of the years that I have doing this particular software solution there is no duplication.
Bank sort code (in the UK) is 99-99-99. This six digit code identifies a back branch. There is no duplication of this number.
Then the next part of the account id is the bank account number which is 99999999. This account number may be duplicated (I am advised by the banks that this is not so and I have not come across this). So the account id becomes 99999999999999. This will be a unique number for your bank account.
The FITID is in two parts. The first part is the transaction date in the form YYYYMMDD (20160220). The second part is a numeric count starting at 1 and incremented by one for each transaction against your account on that particular day. So, if you have 5 transactions appearing on 20 February then you will get 2016022000001 through 2016022000005. The next day the first transaction will become 2016023000001.
When these two parts are concatenated then you will get a unique reference like 611004645306362016022000001.
I fully understand from where you are coming, and adding something like ‘^^^’ is a safeguard that is worth having. This will then give the key 61100464530636^^^2016022000001.
In my testing, though, there is no single duplication on over 350,000 records.
This is an interesting topic, though, and I appreciate all your inputs to the debate.