You should *ALWAYS* indicate which version of MySQL you are using when you
ask this sort of question; the answers is almost always "it depends: if you
are using 3.x, do X, if you are using 4.0.x do Y, if you are using 4.1.x do
Z". It's a lot of work to list all of those options and most people won't do
it.

It would also help if you provided information about what columns occurred
in each table so that potential responders are clear on what information is
in each of your tables. Including a few typical sample rows is also very
helpful for some of us, although some people can envision the data clearly
with only the column names.

Rhino


----- Original Message ----- 
From: "Mike Zornek" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Thursday, January 20, 2005 11:01 AM
Subject: Need help forming SQL query


> I have the following query which will get me all of the emails for my
> current membership:
>
> SELECT email.email_address
> FROM member, email
> WHERE
> member.member_primary_email_id = email.email_id
> AND member.member_standing != "Dropped"
> ORDER BY email.email_address
>
> I also have a query which will get me the email addresses of anyone who
has
> updated their profile (and thus has a row in updatehistory)
>
> SELECT DISTINCT email.email_address
> FROM member, email, updatehistory
> WHERE
> member.member_primary_email_id = email.email_id
> AND member.member_standing != "Dropped"
> AND member.member_id = updatehistory.member_id_editor
> ORDER BY email.email_address;
>
> How would I get the emails for every member who does NOT have a row in
> updatehistory?
>
> ~ Mike
> -----
> Mike Zornek
> Web Designer, Media Developer, Programmer and Geek
> Personal site: <http://MikeZornek.com>
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005
>
>



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to