samedi 27 juin 2015

SQL DELETE WHERE GROUP BY ... HAVING

Would there be a way to make this SQL statement to work...

DELETE AHsTransactions WHERE SerialNumber <> 0 GROUP BY TypeID, AH1ID, AH2ID HAVING COUNT(*) > 1

Incorrect syntax near the keyword 'GROUP', so seems impossible in just one SQL statement.

Aucun commentaire:

Enregistrer un commentaire