jedimastermopar
04-12-2007, 05:36 PM
Hi,
I have two tables, both tables contain a matching JobID.
Some records in the job table are not present in the joblocation table.
I need to Select only those records.
I thought I could just do a left join on the two tables with a not equal to where clause?
SELECT
job.JobLocation1,
job.City,
job.Province,
job.SiteName1,
job.Code,
job.JobID,
joblocation.JobID
FROM soileng.joblocation joblocation
LEFT OUTER JOIN soileng.job job ON joblocation.JobID = job.JobID
WHERE job.JobID != joblocation.JobID limit 100
Any ideas on how to get this to work?
I have two tables, both tables contain a matching JobID.
Some records in the job table are not present in the joblocation table.
I need to Select only those records.
I thought I could just do a left join on the two tables with a not equal to where clause?
SELECT
job.JobLocation1,
job.City,
job.Province,
job.SiteName1,
job.Code,
job.JobID,
joblocation.JobID
FROM soileng.joblocation joblocation
LEFT OUTER JOIN soileng.job job ON joblocation.JobID = job.JobID
WHERE job.JobID != joblocation.JobID limit 100
Any ideas on how to get this to work?