The following select statement works perfectly. I am running this to review records before deletion. However when I change the 'SELECT *' to 'DELETE', I cannot get this sql to run at all. Any input appreciated:
The above code will not make much sense as the cus_no should never be null, but I am trying to write some SQL to clean up the database. Any help welcome.
Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
Code:
SELECT *
FROM IMDISFIL_SQL LEFT OUTER JOIN AROPNFIL_SQL ON IMDISFIL_SQL.doc_no = AROPNFIL_SQL.doc_no
WHERE (IMDISFIL_SQL.dist_dt BETWEEN 20050501 AND 20050531) AND
(IMDISFIL_SQL.pkg_id = 'OE') AND
(AROPNFIL_SQL.cus_no IS NULL)
The above code will not make much sense as the cus_no should never be null, but I am trying to write some SQL to clean up the database. Any help welcome.
Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports