Hi,
Below is the Replicat script
MAP ARADMIN.T539, TARGET DATASTORE.ATTRIBUTE, KEYCOLS(ENTRYID), &
-- Query block for INSTANCEID column of the table
SQLEXEC (ID LOOKUP_MOI, QUERY "select instanceid from DATASTORE.MANAGEDOBJECTINSTANCE where TROUBLEREPORTID=:TR_IN and INSTANCENAME=:I_IN", PARAMS (TR_IN = C911001001, I_IN = C911001102)),&
COLMAP (
ATTRIBUTEID=@COLSTAT (MISSING),
TROUBLEREPORTID=@IF (@STRFIND (C911001001,'ID',1)=1,@COLSTAT (NULL),C911001001),
NAME=C911003014,
VALUE=C911005010,
TYPE=C911003018,
PARENTNAME=C911005001,
INSTANCEID=@IF (@COLTEST (@GETVAL(LOOKUP_MOI.instanceid),NULL,INVALID),@COLSTAT (NULL),@GETVAL(LOOKUP_MOI.instanceid)),
ENTRYID=C1);
When the SQLEXEC couldn't find a match, it returns ORA-1403 -no data found (in SQLPLUS --> no rows selected).
When this is happening, I would like the field to be updated with NULL and in my case this update is not happening and the previous value remains the same in the database (literally meaning, the record is ignored).
Is there a way to handle this situation something like no_data_found exception in pl/sql blocks? Any help is much appreciated.
Thanks!