I have a remote DB2 database that I'm accessing through ODBC. When I have a query like
SELECT t.foo, t.bar, t.problemcolumn
FROM problemtable t
WHERE t.bar < 60;
it works like a charm, so the table and columns obviously exist.
But if I specify the problem column in the WHERE clause
SELECT t.foo, t.bar, t.problemcolumn
FROM problemtable t
WHERE t.problemcolumn = 'x'
AND t.bar < 60;
it gives me an error
Table "problemtable" does not exist.
What could possibly be the reason for this? I've double checked the spellings and I can trigger the problem just by including the problemcolumn in the where-clause.