The error I got was:
SQLState: 22023
Message: SR169: signal state should be an integer 100 (NO DATA FOUND)
or a string value, not an INTEGER
However it was my fault, I had overlooked the line "state := '0';" and
wasn't setting the state variable to an initial value as I had assumed the
'000
Hi Quentin,
The example as defined in the docs link does work (apart from minor error in
variable declarations which will be corrected) :
SQL> create procedure tb_is_empty (in tb varchar) { declare state, msg,
descs, rows any; state := '0'; exec (sprintf ('select 1 from %s', tb),
sta
The documentation is a little outdated here:
http://docs.openlinksw.com/virtuoso/fn_exec.html
It describes catching exceptions with something like:
if (state <> '0')
signal (state, msg);
However this will not work and throws various errors. Something like the
below will work:
declare