Oracle SQL Update with rowover partition -


why error b1.employee_id invalid identifier sql below:

update table_1 a1    set a1.addl_seq = ( select seq                          (select row_number() on (partition employee_id                                                          order employee_id, erncd) seq                                 table_1) b1                         b1.employee_id=a1.employee_id ); 

you can write update statement this:

update     (select employee_id, addl_seq,          row_number() on (partition employee_id order employee_id, erncd) seq    table_1) set addl_seq = seq; 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -