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

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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 November 22nd, 2003, 08:02 AM
awishedforsong awishedforsong is offline
almost there....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: A Red Glitter Coffin
Posts: 140 awishedforsong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 28 m 24 sec
Reputation Power: 0
Send a message via MSN to awishedforsong
Exclamation an IS IN clause?

Is there a keyword where i can do something like this:

SELECT m.name FROM members m, membernumbers q
WHERE m.number IS IN q.number

???
basically give all the names of members whose number is in the column in the second table?

If not i need some serious help please check out my other post entitled table of REFs from Nov 19th!

Reply With Quote
  #2  
Old November 22nd, 2003, 08:09 AM
awishedforsong awishedforsong is offline
almost there....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: A Red Glitter Coffin
Posts: 140 awishedforsong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 28 m 24 sec
Reputation Power: 0
Send a message via MSN to awishedforsong
oh found it!

for anyone looking for it its just

IN:

eg SELECT m.name FROM members m, numbers n
WEHRE m.number IN n.num

or something

Reply With Quote
  #3  
Old November 22nd, 2003, 08:53 AM
r937's Avatar
r937 r937 is offline
SQL Consultant
Dev Shed God 43rd Plane (26000 - 26499 posts)
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 26,442 r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 2 Days 14 h 17 m 3 sec
Reputation Power: 4141
SELECT m.name
FROM members m
, numbers n
WHERE m.number = n.num

why IN?

Reply With Quote
  #4  
Old November 22nd, 2003, 08:58 AM
awishedforsong awishedforsong is offline
almost there....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: A Red Glitter Coffin
Posts: 140 awishedforsong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 28 m 24 sec
Reputation Power: 0
Send a message via MSN to awishedforsong
Oh, the example was simplified.

I had a table of REFs and i wanted to see if a certain REF was in it, i couldn't use equals because it gave me an error saying single row subquery only or something like that...

It wouldn't work, but it does for IN

here's the statement...

SELECT s.stuid, s.name, s.age
FROM studentmembers s
WHERE REF(s) IN
(SELECT * FROM TABLE
(SELECT playerlist
FROM hometeams
WHERE id = 1));

It wouldn't work with equals, but it does with IN!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > an IS IN clause?

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap