Hi All,
I have following table Record_Status in oracle. In this table, we have added a new column Batch_id. I need to assign a batch id to existing records based on following criteria
If CREATED_UPDATED_BY, CREATED_UPDATED_DATE,ORG_ID, USER_ID,UDR_ID,PF_ID for records is same, then to all the records matching this criteria should have same Batch_ID from a sequence, unique records will get a new value from an existing sequence.
Let me know if you need more information or example for this.
|
ID | Number |
CREATED_UPDATED_BY | Varchar2 |
CREATED_UPDATED_DATE | Date |
ORG_ID | number |
USER_ID | number |
UDR_ID | number |
PF_ID | number |
Name | varchar2 |
BATCH_ID | number |
| varchar |
Status | varchar |
Could you please provide a sql or procedure to update the record in this manner?
Thanks for your time to look into this question and all your help.
Regards,
Ashish Mishra