Hi !
I have two schema: A1 và A2. And I have "Cates" table in the both schema.
I create a store procedure "SyncData" in A1 with details:
CREATE OR REPLACE NONEDITIONABLE PROCEDURE A1.SyncData AS
BEGIN
MERGE INTO A2.Catest2
USING (SELECT * FROM A1.Cates) t1
ON (t2.ID = t1.ID)
WHEN MATCHED THEN
UPDATE SET
t2.Name = t1.Name
WHEN NOT MATCHED THEN
INSERT
(t2.ID, t2.Name)
VALUES
(t1.ID, t1.Name);
END;
When I execute that script, the error "ORA-00942: table or view does not exist" has been throwed.
How can I fix it?Please help me !!