Thanks,
As you can see from my next post I used this variant. I think this
interpretation of 100 from UDF in selects is a potential source of
programmers errors. For me more logical will be returning exception
with error code 100 from select but not empty resultset.
If you leave the UDF via STOP you signal the caller that an error occured, i.e. the error 100 leaves the context of the function. Besides, we recommend not to use MaxDB error codes for the stop statement. You should for example use error codes between 31000 and 32000 .
If 100 is ok in your function you should not leave with STOP(100). Instead you should leave without STOP. Of course you must provide a return values in this case :
create function GIS.ret_test
returns varchar AS
VAR
f varchar(10);
begin
try
select resid into :f from gis.test2;
return f;
CATCH
if $RC = 100
THEN
return NULL
ELSE
STOP($rc, $errmsg);
end;
Best Regards,
Thomas
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]