Re: SQL Update query

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


Date: Wed, 18 Aug 2004 14:09:01 -0700

Hi Vishal,

Thanks, it worked without any issues. Just to check with you, what was the
difference between NOT IN and NOT exists. In the new update you passed had
NOT exists clause and it worked. Can you pls clarify to resolve the doubts.

Thanks
Tom

"Vishal Parkar" wrote:

> try this:
>
> begin transaction
> UPDATE A
> 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 )
>
> --check the data and commit / rollback accordingly
>
> --
> Vishal Parkar
> vgparkar@yahoo.co.in | vgparkar@hotmail.com
>
>
>



Relevant Pages