At 3:30 PM +0100 7/8/99, A. Brandic wrote:
>Trying to select records that exist in tableA but do not exist in tableB.
>select * from tableA LEFT JOIN tableB ON tableA.id=tableB.id where
>now, id is a primary key in both tables and it is integer not null.
>This query gives me an empty set but whereas I'm expecting 73 records
>which exist in tableA but not in tableB.
>Where m I making a mistake?
You can't use "=" to test for NULL. Try tableb.id IS NULL instead:
select * from tableA LEFT JOIN tableB ON tableA.id=tableB.id where
tableb.id is null;
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/