dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

Need Query for the Problem in DB2 - db2-udb

This is a discussion on Need Query for the Problem in DB2 - db2-udb ; I have 10000 accounts in my database Now I have given a select statement like this select acct_nmbr from acct_database where acct_nmbr in (here I have given 6500 account numbers) The select query fetched 6000 records, but I dont know ...


Home > Database Forum > Other Databases > db2-udb > Need Query for the Problem in DB2

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 10-24-2008, 07:24 AM
Database Newbie
 
Join Date: Oct 2008
Posts: 1
abdularab is on a distinguished road
Exclamation Need Query for the Problem in DB2

I have 10000 accounts in my database

Now I have given a select statement like this

select acct_nmbr from acct_database
where acct_nmbr in (here I have given 6500 account numbers)

The select query fetched 6000 records,
but I dont know which 500 account numbers not present in the database.

I need a query to find the 500 missed records...

Please help me...

Thanks in advance

Abdul
Reply With Quote
  #2  
Old 10-27-2008, 02:24 AM
Database Newbie
 
Join Date: Oct 2008
Posts: 1
sundaylxf is on a distinguished road
Smile Re: Need Query for the Problem in DB2

table a 10000 records
table b 6500 records


select * from b where acct_number not in(select acct_number from a)
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 12:05 AM.