Could you help me out with this:
I am trying to utillize the Data upload feature in Oracle APEX 4.2.
Create New Page > Data upload
I am giving a transformation here which checks for existing data. If data exists, the transformation updates the table else inserts. I am using the Merge command to execute this:
I am using a "PL SQL Function" here,
MERGE INTO DEPT TARGET
USING (SELECT :DEPTNO DEPTNO, :DNAME,:LOC FROM DUAL) SOURCE
ON (TARGET.DEPTNO = SOURCE.DEPTNO)
WHEN MATCHED THEN
UPDATE SET TARGET.DNAME = SOURCE.DNAME, TARGET.LOC=SOURCE.LOC
WHEN NOT MATCHED THEN
INSERT (TARGET.DEPTNO, TARGET.DNAME, TARGET.LOC) VALUES(SOURCE.DEPTNO, SOURCE.DNAME,SOURCE.LOC);
It is a simple DEPT table which as 3 columns(DEPTNo, DNAME, LOC)
But it always throws me an error like
Sequence Action DEPTNO DNAME LOC
1 FAILED 52 EMPLOYEE MUMBAI
2 FAILED 61 TEST TEST
What is that i am doing wrong here. I have tried this before and it used to work earlier. But unfortunately it is not working now.
Your help would be appreciable.
Edited by: Srikumar S on Mar 6, 2013 6:12 AM