The syntax for the update in Oracle is little bit differ than MS SQL. The below will describes simple query which was fulfilled my requirement.
UPDATE JAN_TAX_2012 J
SET J.EMP_NUMBER =
(
SELECT E.EMP_NUMBER
FROM HS_HR_EMPLOYEE E
WHERE E.EMP_DISPLAY_NUMBER = J.EMP_DISPLAY_NUMBER
)
WHERE EXISTS
(
SELECT E.EMP_NUMBER
FROM HS_HR_EMPLOYEE E
WHERE E.EMP_DISPLAY_NUMBER = J.EMP_DISPLAY_NUMBER
)
No comments:
Post a Comment