Re: Help with SQL syntax
Posted in 1995
In article <4argvp$djk@soap.news.pipex.net>, deanh@Unipalm.Pipex.Com (Dean hobbs) says:
>
>Hi,
>
>I am trying to find records in one table that do not have matchin entries
>in another table. I have done this before in Access but cannot get it to
>work with Informix. Here is the syntax I am using.
>
>SELECT account.acc_name, account.password FROM account, OUTER temp WHERE>account.acc_name = temp.acc_name AND temp.acc_name IS NOT NULL
>
>Can anybody tell me where I am going wrong. In the manual it says that
>there should be a null entry in the 2nd table which is what I would expect
>but I still can't get it to work.
>
How about
SELECT account.acc_name, account.password FROM account
WHERE account.acc_name NOT IN ( SELECT temp.acc_name FROM temp) ;