Skip to content
Advertisement

Oracle decode equivalent function to Postgres

So, I’m in migrating database from oracle to Postgres, and this is my error:

and here’s my code :

do you have any clue?

From what I’ve read, some say to replace the decode function with COALESCE, but I don’t have any idea how the syntax is.

Advertisement

Answer

You could use a standard case expression:

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