473,325 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

how does update work with 'not in'

sample:
Expand|Select|Wrap|Line Numbers
  1. update tableA 
  2.    set flag = 'N' 
  3. where id not in 
  4.    (select id 
  5.     from tableA 
  6.     where flag = 'Y')
Q: how does this query work?
is system firstly get the list which falg is 'Y', then pick up each id and check if it's in the list, then update accordingly?

Or

is system pick up one id and get the list which flag is 'Y' everytime, then update accordingly?
Aug 12 '13 #1
3 1322
ck9663
2,878 Expert 2GB
It sounds like it is...


~~ CK
Aug 12 '13 #2
Rabbit
12,516 Expert Mod 8TB
I don't understand either one of your descriptions. What it's doing is if an id has a record in the table where the flag is set to Y, don't update that row. Update everything else to N.
Aug 12 '13 #3
First statement is correct. firstly get the list which falg is 'Y'. then will check with all id's..
Aug 23 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Generic Usenet Account | last post by:
While I have a very good feel for how inlining works, I fail to see how in the world inlining can work if the inlined function is not described "in place" in a header file, but rather defined in a...
44
by: Bamber | last post by:
Why does f get returned ? (compiled with gcc). #include<stdio.h> int func(int a); main() { int f; f=func(7); printf("f=%d",f);
0
by: Jarod_24 | last post by:
How does tabindex work in ASP .net pages I dosen't seem to work quite like in regular forms. and there isn't any TabStop property either. 1 .How do you prevent a control form beign "tabbed"....
1
by: Lucas Tam | last post by:
Hi all, I have dyanmically created a datagrid and the cancel/update buttons do not fire. All buttons are "edit". Also, it seems the item indexes are off as well. Does anyone have a tutorial...
2
by: Daryll SHatz | last post by:
Does serialization work on custom data types via structures? Dim bFormatter As New BinaryFormatter() Dim sFile As FileStream = File.Create(FilePath) Dim structure As myStruct Dim val1 as...
1
by: sal | last post by:
Greets, All Question with udl and connection string does it work? I'm having problems with the code below I keep getting an error "Keyword not supported 'File Name'" I was just following...
1
by: Scott Emick | last post by:
I have the following datatables which are related: Transaction TransactionId-Sequence Orders OrderDetails when I process a daTransaction.update(dtTransaction)...
5
by: fortepianissimo | last post by:
I remember from painful experience that copy.copy() won't really copy __slots__ members. But I have trouble explaning why the following code works: --- START--- #!/usr/bin/env python import...
5
by: sticky | last post by:
Hi I need to be able to lock a table against INSERT and UPDATE, but not SELECT, for the duration of a transaction. The transaction will be defined at the application level in c#, and then use...
2
by: =?Utf-8?B?TUNN?= | last post by:
I have an asp.net page that contains an update panel. Within the update panel, controls get added dynamically. During partial page post backs the controls within the panel will change. I have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.