I'm migrating from oracle to postgresl, and i have these 2 problems:
1.
PostgreSQL doesn't support function DECODE from Oracle, but it can be
replicated with
CASE WHEN expr THEN expr [...] ELSE expr END , the problem appears when i
want to convert this sentence from oracle to postgresl:
select decode (pre.C_GEN,'01','M','02','F','') as GENERO
my convertion is
case when pre.C_GEN = '01' then GENERO='M' else GENERO='F'
end ,
but i dont' know if the assigment of GENERO is correct.
2.
Writing triggers i don't know if postgresql supports statements like this:
CREATE OR REPLACE TRIGGER trig
AFTER UPDATE OF column2 <<----- Here is the doubt
ON table_product
FOR EACH ROW
BEGIN
...
END
In postgresql:
CREATE OR REPLACE TRIGGER trig
AFTER UPDATE OF column2 <<----- is this correct?
ON table_product
FOR EACH ROW EXECUTE PROCEDURE trig();
Thanks for your answers..
Rafael
_________________________________________________________________
¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras en
MSN Motor. http://motor.msn.es/researchcentre/