How to define Decode in Materialized View
can anyone help me how to convert below query in Materialized View?
ROUND(DECODE (ACOST.ORGANIZATION_ID, APARM.COST_ORGANIZATION_ID, DECODE (ACOST.COST_TYPE_ID, CTYPE.COST_TYPE_ID, NVL (ACOST.MATERIAL_COST, 0),
CTYPE.DEFAULT_COST_TYPE_ID, NVL (ACOST.MATERIAL_COST, 0), 0), 0), 2)
KHK -- you don't need a MV here. These are functions that are returning a single value. Look into replicating this logic on your existing Incorta table using a new formula column field. https://docs.incorta.com/4.8/r-formula-functions-overview/