Re: SQL Update query

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 08/19/04


Date: Fri, 20 Aug 2004 00:08:04 +0530

hi tom,

you can only update one table in one update statement. to update 2 tables
you will have to write 2 different queries, something as follows.

UPDATE S_ORG_EXT
SET FUL_CENTER_FLG = 'Y'
FROM S_ORG_EXT A, EIM_ACCOUNT B
WHERE B.LOC = A.LOC
and not exists
(select * from S_EVT_ACT C where C.TARGET_OU_ID = A.ROW_ID )

UPDATE EIM_ACCOUNT
SET FUL_CENTER_FLG = 'Y'
FROM S_ORG_EXT A, EIM_ACCOUNT B
WHERE B.LOC = A.LOC
and not exists
(select * from S_EVT_ACT C where C.TARGET_OU_ID = A.ROW_ID )

-- 
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com