I am trying run this query statement but it keeps producing the following error message:
where exists (select * from vendor_temp
unknown command beginning "where exis..." - rest of line ignored.
SQL> where a.vendor_cd = vendor_cd)B
unknown command beginning "where a.ve..." - rest of line ignored.
Here is the PL/SQL
update vendor a
set vendor_name = (select vendor_name
from vendor_temp b
where a.vendor_cd = b.vendor_cd),
modified_by = (select modified_by
from vendor_temp b
where a.vendor_cd = b.vendor_cd),
last_mod_dt = (select last_mod_dt
from vendor_temp b
where a.vendor_cd = b.vendor_cd)
where exists (select * from vendor_temp
where a.vendor_cd = b.vendor_cd);
I need to update the vendor_name, modified_by and last_mod_dt fields from the vendor table if the vendor_cd exists in the vendor table and the vendor_temp table
I would deeply appreciate your help
Thank you for all your help
Tom
where exists (select * from vendor_temp
unknown command beginning "where exis..." - rest of line ignored.
SQL> where a.vendor_cd = vendor_cd)B
unknown command beginning "where a.ve..." - rest of line ignored.
Here is the PL/SQL
update vendor a
set vendor_name = (select vendor_name
from vendor_temp b
where a.vendor_cd = b.vendor_cd),
modified_by = (select modified_by
from vendor_temp b
where a.vendor_cd = b.vendor_cd),
last_mod_dt = (select last_mod_dt
from vendor_temp b
where a.vendor_cd = b.vendor_cd)
where exists (select * from vendor_temp
where a.vendor_cd = b.vendor_cd);
I need to update the vendor_name, modified_by and last_mod_dt fields from the vendor table if the vendor_cd exists in the vendor table and the vendor_temp table
I would deeply appreciate your help
Thank you for all your help
Tom