Not sure if decode was replicated in OACS. But I do encourage you to use CASE as this works on both PG and Oracle.