At 4:40 PM -0700 9/7/01, Anthony E. wrote:
>I've tried to do a NOT IN statement, but still am
>getting SQL syntax error.
>SELECT COUNT(*) FROM USER_TMP WHERE USER_TMP.email NOT
>IN (SELECT USER.email FROM USER);
>I'm trying to produce a list of records from USER_TMP
Huh? COUNT(*) produces a count, not a list.
>table where the USER_TMP.email is NOT IN USER.email.
>(in other words, i want only the records where the
>email address from USER_TMP is not already in USER).
>Please help, i've been strugglying on this all day.
You're trying to use a sub-select, and MySQL doesn't
support them yet. You can probably get what you want
with a LEFT JOIN, however:
SELECT USER_TMP.email FROM USER_TMP LEFT JOIN USER USING (email)
WHERE USER.email IS NULL
Paul DuBois, paul@stripped