I am trying to put together a select query for a search function I am working on. I am trying to allow AND/OR/NOT to help limit the results but I can't get NOT to work in the where clause. Here is a output sample:
SELECT company,customerid,compcontact
FROM customers
WHERE (company ~ '.Jen.' OR compcontact ~ '.Jen.')
NOT (company ~ '.Matt.' OR compcontact ~ '.Matt.')
ORDER BY company ASC
The NOT between the ()() is where i get the error of <i>ERROR: parser: parse error at or near "("</i> but AND and OR works. What am I missing here?
Matt