From: | James David Smith <james(dot)david(dot)smith(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Is not equal to query... |
Date: | 2011-06-08 21:57:34 |
Message-ID: | BANLkTikpqm1S7O+YQDuHD4P-o-FoTBr6JQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2011-06-08 22:24:46 | Re: Is not equal to query... |
Previous Message | Erasmo Zottola - Elman | 2011-06-08 14:39:35 | PL/pgSQL editor/debugger |