Help with Update Query -

Advertisement
November 30

I am trying to run the following update query:
update emp
set emp.COMM = 500
where emp.deptno = (select dept.deptno
from dept
where dept.loc = 'BOSTON'
or dept.loc ='NEW YORK')
SQL/Navigator returns:
ORA-01427 - Single Row Subquerty Returns More than one row.
How do I change the query so it will process with multiple return rows on the subquery?
The help text specified I used the ANY, ALL, IN, or NOT IN to specify which values to compare. Any body have an example of this?

Advertisement

Replay

Try this:
update emp
set emp.COMM = 500
where emp.deptno IN (select dept.deptno
from dept
where dept.loc = 'BOSTON'
or dept.loc ='NEW YORK')

View 2 Replies

Tags:

  1. macbook pro periodic sound
  2. anonymous
  3. windonw 8 graphics card dw
  4. hp omni 10 touch bloccato
  5. imovie program for a1151
  6. twmporary segment 정리
  7. 9J18
  8. within6fx
  9. JF0S
  10. press7s1
Copyrights 2019 Fcffair BigData Resource, All rights reserved