Hi,
Have you tried:
SELECT Table1.* FROM Table1 , Table2
WHERE Table1.id = Table2.id AND Table2.offon = 'on'
Hello all!
Here is what I am trying to do.
I am trying to find only records
that all have the same value for a
specific field in a related table.
A simplified example:
On Fri, 27 Apr 2001, Opec Kemp wrote:
Hi,
Have you tried:
SELECT Table1.* FROM Table1 , Table2
WHERE Table1.id = Table2.id AND Table2.offon = 'on'
That was my original idea as well, but that would return Red, where Davin
wants no Red since there is a Table2 row with an off corresponding
: Thursday, April 26, 2001 6:39 PM
To: Opec Kemp
Cc: Davin Flatten; Mysql Mailing List
Subject: RE: Newbie question - Hopefully not too stupid!
On Fri, 27 Apr 2001, Opec Kemp wrote:
Hi,
Have you tried:
SELECT Table1.* FROM Table1 , Table2
WHERE Table1.id = Table2.id AND Table2.offon
Nice query, Braxton. I was trying to do it with a left join, but that
required splitting Table2 into an OFF table and an ON table.
I must remember count(1/(condition)); it seems to be very useful.
Back to my real work...
---
David Block
[EMAIL PROTECTED]