Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> INSTEAD-OF Trigger
Hi
I want to try to use a INSTEAD-OF trigger for an updatable view. I created
it and the view and a new type but I can't sea view's datas. It say me (in
french) :
ORA-22950: can't order objects without method MAP or ORDER.
This is my script :
CREATE OR REPLACE TYPE SALARIE_TYPE AS
OBJECT
(id NUMBER(12),
nom VARCHAR2(50),
vil NUMBER(12),
tag NUMBER(1));
CREATE VIEW SALARIE_VILLE_1_2 (SALARIE_VIEW)
AS SELECT SALARIE_TYPE(SALARIE_ID, SAL_NOM, VILLE_ID, 1)
FROM SALARIE WHERE VILLE_ID=1
ORDER BY 1
UNION
SELECT SALARIE_TYPE(SALARIE_ID, SAL_NOM, VILLE_ID, 0) FROM SALARIE WHERE VILLE_ID=2
ELSE
INSERT INTO SALARIE (SALARIE_ID, SAL_NOM, VILLE_ID, SAL_PRENOM)
VALUES (:NEW.SALARIE_VIEW.id, :NEW.SALARIE_VIEW.nom,
:NEW.SALARIE_VIEW.vil, 'ANTOINE');
END IF; END; Here is my table SALARIE :
SALARIE(SALARIE_ID, ENTREPRISE_ID, VILLE_ID, SAL_NOM, SAL_SALAIRE, SAL_PRENOM, SAL_DATE_NAISSANCE) Someone could help me to know from where come this message ?
Thanks a lot and sorry for my english.
Séverine. Received on Wed Jun 26 2002 - 04:34:03 CDT