Generating Unique IDs(Numbers) based on Unique Keys
I have got a strange problem. I need to generate Unique IDs(Integer)based off of Unique Keys from a source system. I am talking about millions of records. The numbers thus generated should stick with that key and be appended with new numbers for new keys ( in other words, it should persist)Does anyone know of an elegant solution in Teradata.
Re: Generating Unique IDs(Numbers) based on Unique Keys
Hi, when you are talking about millions of records,is it for entire table or in each batch? If 1 or 2 million records come from the source in each batch,the CSUM or RANK functions will not take time to generate unique id's. If you see that the ordered anlytical functions are taking time then identity column can be used as the unique id. But before using identity columns,you have to see that duplicate records should not come from the source.