![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
(Hypothetical Example) I have a database of people and the cars they've driven. Fred Ford Chrysler Volkswagen George Jeep Fiat Mercedes Ford Volkswagen I need to build a list of which cars have been driven by all people. In the above example the list would be Volkswagen and Ford. Given the two tables: People and Cars How do I build the SQL statement? TIA. B. |
#3
| |||
| |||
|
|
(Hypothetical Example) I have a database of people and the cars they've driven. Fred Ford Chrysler Volkswagen George Jeep Fiat Mercedes Ford Volkswagen I need to build a list of which cars have been driven by all people. In the above example the list would be Volkswagen and Ford. Given the two tables: People and Cars How do I build the SQL statement? TIA. B. |
#4
| |||
| |||
|
|
(Hypothetical Example) I have a database of people and the cars they've driven. Fred Ford Chrysler Volkswagen George Jeep Fiat Mercedes Ford Volkswagen I need to build a list of which cars have been driven by all people. In the above example the list would be Volkswagen and Ford. Given the two tables: People and Cars How do I build the SQL statement? TIA. B. |
#5
| |||
| |||
|
|
On 7/28/2011 4:40 PM, SpreadTooThin wrote: I have a database of people and the cars they've driven. I need to build a list of which cars have been driven by all people. In the above example the list would be Volkswagen and Ford. Given the two tables: People and Cars How do I build the SQL statement? First thing to do would be to normalize your database. You have a many-to-many connection between people and cars, and should design your database accordingly. |
#6
| |||
| |||
|
|
On 7/28/2011 4:40 PM, SpreadTooThin wrote: (Hypothetical Example) I have a database of people and the cars they've driven. Fred * * Ford * * Chrysler * * Volkswagen George * * Jeep * * Fiat * * Mercedes * * Ford * * Volkswagen I need to build a list of which cars have been driven by all people. In the above example the list would be Volkswagen and Ford. Given the two tables: People and Cars How do I build the SQL statement? TIA. B. First thing to do would be to normalize your database. *You have a many-to-many connection between people and cars, and should design your database accordingly. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
#7
| |||
| |||
|
|
On Jul 28, 7:57 pm, Jerry Stuckle<jstuck... (AT) attglobal (DOT) net> wrote: On 7/28/2011 4:40 PM, SpreadTooThin wrote: (Hypothetical Example) I have a database of people and the cars they've driven. Fred Ford Chrysler Volkswagen George Jeep Fiat Mercedes Ford Volkswagen I need to build a list of which cars have been driven by all people. In the above example the list would be Volkswagen and Ford. Given the two tables: People and Cars How do I build the SQL statement? TIA. B. First thing to do would be to normalize your database. You have a many-to-many connection between people and cars, and should design your database accordingly. ICBW, but, with such a simple request, it looks more like he is trying to get someone to do his homework for him.... |
#8
| |||
| |||
|
|
ICBW, but, with such a simple request, it looks more like he is trying to get someone to do his homework for him.... |

#9
| |||
| |||
|
|
ICBW, but, with such a simple request, it looks more like he is trying to get someone to do his homework for him.... Dude.. may days of homework are long over.. but thanks for the jab in the side. ![]() This is actually for a medical imaging database and determining what scans have been done on which people. For research purposes only scans that have been done on the entire cohort are of use to me.. I could tell you more but then I'd have to shoot myself for releasing private information into the public sector. Get it? |
#10
| |||
| |||
|
|
ICBW, but, with such a simple request, it looks more like he is trying to get someone to do his homework for him.... Dude.. may days of homework are long over.. but thanks for the jab in the side. ![]() This is actually for a medical imaging database and determining what scans have been done on which people. For research purposes only scans that have been done on the entire cohort are of use to me.. I could tell you more but then I'd have to shoot myself for releasing private information into the public sector. Get it? |
![]() |
| Thread Tools | |
| Display Modes | |
| |