Is not equal to query... - Mailing list pgsql-novice

From James David Smith
Subject Is not equal to query...
Date
Msg-id BANLkTikpqm1S7O+YQDuHD4P-o-FoTBr6JQ@mail.gmail.com
Whole thread Raw
Responses Re: Is not equal to query...  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-novice
Hi everyone,

A bit of help please. This query works for me, and gives me 332,000
rows of records out of my table of 400,000 rows. It takes about a
minute to run.

SELECT vehicle.*
FROM vehicle, incidents
WHERE incidents.key = vehicle.incident_link;

Would I would like to do however, is remove the data from this table
that does not match the above query. So to start with, I thought that
I'd better try and identify this data using the query below. You'll
note I have simply changed the '=' for '!=' instead.

SELECT vehicle.*
FROM vehicle, incidents
WHERE incidents.key != vehicle.incident_link;

However when I run this query, after about 10-15 minutes, I still
don't have a result. I don't really understand why not.

Cheers as always.

James

pgsql-novice by date:

Previous
From: Erasmo Zottola - Elman
Date:
Subject: PL/pgSQL editor/debugger
Next
From: Merlin Moncure
Date:
Subject: Re: Is not equal to query...