sql - MySQL Where Not Exists -
what's wrong code? keep getting error 1064 (42000): have error in sql syntax
select clientreport.id clientreport.rownumber not exists ( select clientreport.rownumber report02, clientreport report02.id=clientreport.id);
i assume want like:
select clientreport.id clientreport left join report02 on(report02.id = clientreport.id) report02.id null;
this return ids clientreport have no corresponding entry in report02.
an alternative might be:
select clientreport.id clientreport clientreport.rownumber not in ( select clientreport.rownumber report02, clientreport report02.id=clientreport.id);
Comments
Post a Comment