I need some help writing update statement. My objective is to populate any blank EQ_ID and ORDERID by copying the EQ_ID and ORDERID from a row that has the same A_NUMBER, C_CD, and PERSONID
I require the update statement to scan the EST (name of the table) table:
- For a certain period of time eg. 1st May 2015 to 10th May 2015
- Look for a row with blank EQ_ID and ORDER_ID
- populate any blank EQ_ID and ORDERID by copying the EQ_ID and ORDERID of a row that has the same A_NUMBER, C_CD, and PERSONID
Can you please let me know how to do this the best way?
Attached is a screenshot of data from EST table