Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 14th, 2005, 03:26 AM
Manimekala Manimekala is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: India
Posts: 20 Manimekala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 5 m 51 sec
Reputation Power: 0
Question SQLQuery using IN Operator...

I wrote a query like the following.

Select * from emp where empno in (1000,2000,3000);

In emp table i have only one empno 1000.the above query returns the details about 1000.but i want to just show the not available numbers along with the result.is it possible ?..
Pls Help....

Thanx in advance.

Reply With Quote
  #2  
Old February 14th, 2005, 10:15 AM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 20 m 49 sec
Reputation Power: 48
I don't get what you want, but this is a 'not' part of:
Code:
Select * from emp where empno NOT in (1000,2000,3000);

Reply With Quote
  #3  
Old February 15th, 2005, 03:34 AM
Manimekala Manimekala is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: India
Posts: 20 Manimekala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 5 m 51 sec
Reputation Power: 0
Hi jim mcnamara... Ya i'll explain in detail

In hav a table called sub_details having fields like mobile_no,name,balance,transdate.i have more than 2 lac records.the key field in this table is mobile_no.now i'm supplying a query to select the details of subscriber with a set of mobile_nos got from an external application(it may go upto 40000).

In that 40k numbers, most of them may not be present in sub_detail.

I used to show the available subscriber details with the select query using IN Operator. It shows only available details. But I want to show available and Not available details.

Sugest a Best Query.

thank you

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > SQLQuery using IN Operator...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT