db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Sp." <patspringer2...@gmail.com>
Subject Quering on multiple rows
Date Thu, 08 Nov 2007 17:03:24 GMT

Hi,

I have a schema that generates a set of tables with the following
relationships:
An employee may have several Missions.
E.g. 'Svendson' is related to 'New York' , 'Vegas' and 'Boston'

Table Employee
Employee_ID  	Name
-----------             --------
01 		        Hansen
02 		        Svendson
03 		        Black
04 		        Pettersen

Table Missions
Mission_ID	City	 	Employee_ID
--------------	    -----	      ------------------
1		    Atlanta 	    01
2		    New York 	 03
3		    Vegas 	    03
4		    Boston	    02
5		    Boston	    03


I need to perform a search that extract all the employees with constraints
on multiple values from the table 'Missions' such as 

Employee.Name='Svendson'
and
that has in Missions.City all 'New York', 'Vegas' and 'Boston'
How to do that in SQL.
Thanks for your help.
P.
-- 
View this message in context: http://www.nabble.com/Quering-on-multiple-rows-tf4772154.html#a13651100
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message