SQL Update query

From: Tom (Tom_at_discussions.microsoft.com)
Date: 08/18/04


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



Relevant Pages

  • Re: Concatenating Multiple Values for DataValueField
    ... Which field would you be updating in any type of ... No matter you accomplish this, obviously you would always have to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Did I dream it?
    ... Everything you wrote may be true but you can't extend that to saying "Updating is required" FREE BMD is not "required" to do anything. ... If they've decided to give higher priority to the vast majority of users rather than matching "the criteria that it should match" that is their choice. ... You claimed that you were somehow representing the interests of the volunteers who have freely contributed tens of thousands of hours to the project. ... You have every right to speak on your own behalf but you have no right to speak on theirs. ...
    (soc.genealogy.britain)
  • Re: update the %complete according to actual date
    ... purposes of updating. ... like tasks based upon specific criteria and then just re-apply the group ... Is there any way that i can make a selection of different tasks to be ...
    (microsoft.public.project)
  • Re: UpdateQuery only on the record specified by a form
    ... Is there a unique field in the record the user is updating? ... Meaning placing the form value in the query criteria, and updating the ...
    (microsoft.public.access.queries)
  • Re: crosstab query
    ... or enter the following as the criteria ... In the SQL statement that would be ... particular account number by updating a combo box on a form. ... have in the crosstab query is as follows: ...
    (microsoft.public.access.queries)