We have a requirement to have a automatic sequence generator column in our table, some thing like the below:
Invalid MERGE-INTO statement: Target table with Identity column as primary index is not allowed with WHEN NOT MATCHED specifiction
We cannot do any changes to the Merge statement. My Question is, is there a way to create Identity column or automatic squence generator (which we can consider as Unique Index) in Teradata. Because we need a unique index for our framework to run sucessfully but in our business logic we dont have any unique index column requirement, that is why we tried to create an Identity column, which would also work as a UI.
According to the Merge Into documentation, PI can be identity column, it was restricted with Upsert form of update.
What if you generate the ID in some tamp table and then insert into this UPI column along with the other data during loading process?