Subject Re: What's wrong with this query?
Author vladman992000
--- In firebird-support@yahoogroups.com, Svein Erling Tysvaer
<svein.erling.tysvaer@...> wrote:
>
> Sorry, I didn't notice the last few replies to this thread where it is
> better described what you want (my reply was directed towards your
> initial email only, where it still wasn't evident what you were looking
> for). Emb_blaster has already written an appropriate query, and Mark
> almost got it right as well, the only thing missing is that the
> parameter has to be in the JOIN clause:
>
> SELECT te.email_address
> FROM temp_email3 te
> LEFT JOIN recipient re ON te.email_address = re.email_address
> AND re.fk_client_id = :A_CLIENT_ID
> WHERE re.email_address IS NULL
>
> Basically, you have two identically good solutions to choose from.

Thank you Set, and to everyone else who chimed in on this...

Yes, the above query works perfectly. Its the line "WHERE
re.email_address IS NULL" that was throwing me.

Very much appreciated to everyone.

Myles