View previous topic :: View next topic
|
Author |
Message |
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
I have a table with 6000 codes
I have un update statement which should update 87 rows
Update table
set STATUS = 'N'
where code IN ('A', 'B', etc)
It only updates 80 rows
There are seven codes in the IN-list not present in the table.
What is the SQL-statement to know which 7 codes are not present? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
where code NOT IN ('A', 'B', etc)? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I have un update statement which should update 87 rows
|
How do you know there should be 87?
The same "where" that would identify these 87 would also include them for update
Quote: |
where code NOT IN ('A', 'B', etc)? |
I believe this would return far too many rows. . . |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Could you please be little more cryptic in choosing the subject title..grin.. |
|
Back to top |
|
|
|