Hi,
a simple way would be to code as follows
Code:
IF T_date IS NOT NULL THEN
update table1 set data1= "some value"
where date1 = T_date;
END IF;
Another way would be to handle the -696 exception with ON EXCEPTION
something like
Code:
ON EXCEPTION IN (-696)
put here how you handle this error
END EXCEPTION
update table1 set data1= "some value"
where date1 = T_date;
If you want to debug all this, use :
Code:
SET DEBUG FILE TO 'filename';
TRACE ON;
more code here
You could also try to determine whether is is acceptable to have a null value for t_date, and set a relevant constraint on it if necessary.
Regards,
Eric