Skip to content
Advertisement

Using FILTER in IBM DB2 query


I have some queries which works correctly in PostgreSQL but I have to use them to make IBM DB2 queries. It seems like “FILTER” doesn’t work with DB2.

My PGSQL query :

When I use this with DB2 I get this error :

Advertisement

Answer

In general, it should be possible to rewrite the FILTER into a CASE statement. Something like:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement