SQL Update query
From: Tom (Tom_at_discussions.microsoft.com)
Date: 08/18/04
- Next message: Lorettta: "Re: Null values"
- Previous message: Paul: "SQL Licence for twin processor"
- Next in thread: Vishal Parkar: "Re: SQL Update query"
- Reply: Vishal Parkar: "Re: SQL Update query"
- Reply: Tom: "RE: SQL Update query"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Aug 2004 10:27:03 -0700
Hi,
We are having problems while updating one table based on certain criteria.
In our scenario, there are 3 tables i.e EIM_ACCOUNT, S_ORG_EXT, S_EVT_ACT.
Column definition of above table
EIM_ACCOUNT
***********
ROW_ID
Name,
LOC
S_ORG_EXT
***********
ROW_ID,
NAME,
LOC
PR_FUL_REQ_FLG
S_EVT_ACT
************
ROW_ID
TARGET_OU_ID
TYPE
The business requirement is to update PR_FUL_REQ_FLG with 'Y' of S_ORG_EXT
TABLE only if LOC of EIM_ACCOUNT = LOC of S_ORG_EXT and ROW_ID OF S_ORG_EXT
TABLE is not equal to TARGET_OU_ID OF S_EVT_ACT Table. The query that was
created for updating field is mentioned below
UPDATE S_ORG_EXT
SET FUL_CENTER_FLG = 'Y'
FROM S_ORG_EXT A, EIM_ACCOUNT B, S_EVT_ACT C
WHERE B.LOC = A.LOC
AND A.ROW_ID NOT IN
(SELECT C.TARGET_OU_ID FROM S_EVT_ACT C)
Can you please help identifying the problem !!!
Thanks
Thom
- Next message: Lorettta: "Re: Null values"
- Previous message: Paul: "SQL Licence for twin processor"
- Next in thread: Vishal Parkar: "Re: SQL Update query"
- Reply: Vishal Parkar: "Re: SQL Update query"
- Reply: Tom: "RE: SQL Update query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|