I have a query that does a left join between two tables (i.e. there may or may not be records in the second table, but I want all records from the first table).
Now I need to apply a certain criteria to the records that come from the second table ... but what if there are no records?
How should I do this?
SELECT table1.field, table2.field
FROM table1 LEFT JOIN table2 ON table1.field = table2.field
WHERE table2.field GT 1
??? This throws an error when there are no results returned from table 2.
Thanks
Jeff