Why does this simple query return \'ORA-00936: missing expression\' (the database is Oracle as you can tell):
SELECT * FROM transactions WHERE id NOT LIKE \'1%\'
You've missed the id out before the NOT; it needs to be specified.
SELECT * FROM transactions WHERE id NOT LIKE '1%' AND id NOT LIKE '2%'