I use the following SQL statment to bring z_emp_id values to a
employee table:
update employee set z_emp_id =
(select z.emp_id from z.employee z where z.login=employe e.login)
Upon executing this statement a warning appears (in AQT) saying all
the rows in the table will be modified.
Is this a benign message?
I would expect a warning, if any, to say how many rows would change.
The results (100 or so modified rows) appears to be correct.
I'd like to create an alternative SQL statment, something like:
update employee
set z_emp_id = z.emp_id
from (select emp_id from z.employee z where z.login in (select login
from z.employee)) z
where login = z.login
where z_emp_id is assigned from the z select.
This statement fails because DB2 doesn't understand FROM in this
context.
Might someone be so kind as to suggest a SQL statement that doesn't
impact all rows and has cleaner syntax?
Thanks.