Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Need help Select for Oracle 8i
cord wrote:
> Hello!
>
> I need some help with a select statement for our oracle 8i. It should
> be quite easy for someone who nows what he is doing, but I can't
> figure it out.
>
> I have two tables (simplified):
>
> reg.users
> - id
> - nickname
> - e_mail_lower
> - gender
>
> reg.email_locklist
> - e_mail_lower
>
> I have to select all Females (Value in "gender" is "f") from the first
> table, who's e-Mail-Adress is not in the second table.
>
> Could someone help me with that?
>
> Thank you!
> Cord
There are numerous ways to do this. And as you appear to be taking a class this is something you need to figure out for yourself.
But here are a few hints to get you going in the right direction. I am assuming e_mail_lower is the field that joins the two tables together even though I find that horrifying. Anyway ....
Consider using NOT IN in the WHERE clause. To find those records where the e_mail_lower in one table is not present in the other table.
Daniel Morgan Received on Mon Oct 28 2002 - 10:36:05 CST