negation in alert query?

In Log Analysis I have an alert that fires when the string "com.ibm.db2.jcc.am.SqlSyntaxErrorException" appears in a Websphere log. My users want me to exclude certain SQLCODEs from being alerted. How can I do this? For example, they would like to be alerted on all messages containing "com.ibm.db2.jcc.am.SqlSyntaxErrorException" EXCEPT for those that include the string "SQLCODE=-10"