Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SQL to fetch data that are not there in the list

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Sun Feb 08, 2009 2:02 am    Post subject: SQL to fetch data that are not there in the list
Reply with quote

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
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Feb 08, 2009 2:09 am    Post subject:
Reply with quote

where code NOT IN ('A', 'B', etc)?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Feb 08, 2009 4:09 am    Post subject:
Reply with quote

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 icon_confused.gif

Quote:
where code NOT IN ('A', 'B', etc)?
I believe this would return far too many rows. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Feb 09, 2009 12:44 pm    Post subject:
Reply with quote

Hi,

Could you please be little more cryptic in choosing the subject title..grin..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts 3270 Data stream error Benchwarmer CICS 4 Tue Apr 17, 2018 12:06 am
No new posts How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 pm
No new posts List of jobs ran thru scheduler ddhar All Other Mainframe Topics 1 Tue Mar 27, 2018 4:32 am
No new posts How could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm
No new posts Invalid XML character while producing... nikhil.bhole IBM Tools 4 Tue Mar 20, 2018 1:24 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us