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

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -