I'd like a DB2 compatible query for all the values in my own hardcoded list of values that are NOT in a table. This query works well in Microsoft SQL Server
SELECT * FROM
(values (1),(2),(3),(4),(7), (7000000)) as T(ID)
EXCEPT
SELECT ID
FROM ACCOUNT;
I'm aware of this answer SQL - How can I return the IDs from a where clause list that are not in the table? where they suggest using a VALUES clause. Perhaps it works with other versions of DB2, but on mine I get the error "Illegal symbol (" so I'm not sure it likes the VALUES function in my version of DB2.