rules

Started by Ramesh Tabout 11 years ago1 messagesgeneral
Jump to latest
#1Ramesh T
rameshparnanditech@gmail.com

it is in postgres i need to convert into oracle
CREATE RULE payment_insert_p2007_04 AS ON INSERT TO payment WHERE
(new.payment_date >= '2007-04-01'::timestamp without time zone) DO INSTEAD
INSERT INTO payment_p2007_04 (payment_id)VALUES (1);

in oracle format i used google
i got

BEGIN
DBMS_MACADM.CREATE_RULE(
rule_name => 'Restrict Access to Maintenance Period',
rule_expr => 'TO_CHAR(SYSDATE,''HH24'') BETWEEN ''14'' AND ''15''');
END;
/

it is not works for me ,any one let me know is it possible create rule in
oracle on particular table as i mentioned create rule as postgres format.