Hi Frzz,
There is a requirement where in I have two tables T1 and T2.
I need to move data from T1 to T2.
we are using BODS to load data to T1,when the record got inserted in HANA T1 Table I am trying to write a trigger to load the same record in T2 as well with the below trigger syntax.
But I am getting an error.
Please suggest me how I can achieve the same.
Sample Code:
AFTERINSERTON TABLE1 FOR EACH ROW
BEGIN
DECLARE EMP_ID_VAR varchar(10);
DECLARE EMP_NAME_VAR VARCHAR(20);
SELECT EMP_ID INTO EMP_ID_VAR FROM TABLE1;
SELECT EMP_NAME INTO EMP_NAME_VAR FROM TABLE1;
INSERTINTO TABLE2(EMP_ID,EMP_NAME)
VALUES(:EMP_ID_VAR,:EMP_NAME_VAR);
END;
Error: SAP DBTech JDBC: [7]: feature not supported: select on the subject table (SOMAYAJIV.TABLE1) inside a trigger is not allowed
Please suggest whats wrong with the code.