unexpected token: when + bug in sqleditor
Ivan Smahin
ivan_smahin at paradigmasoft.com
Thu Sep 20 14:39:32 CDT 2007
Hello Bart,
Thursday, September 20, 2007, 10:12:19 PM, you wrote:
> Hi List,
> 1) what is wrong with this stored procedure:
> create or replace procedure spBuildUserTypes()
> begin
> DECLARE mylastrecid Long;
> insert into tbl_typelists(created_by,typelistname) values
> ('spBuildUserTypes','usertypes');
> set mylastrecid = select recid FROM tbl_typelists where typelistname
> = 'usertypes';
> insert into tbl_typelistvalues
> (displayname,listvalue,objptr_typelist) values ('active',1,mylastrecid);
> insert into tbl_typelistvalues
> (displayname,listvalue,objptr_typelist) values ('deactivated',
> 2,mylastrecid);
> insert into tbl_typelistvalues
> (displayname,listvalue,objptr_typelist) values ('blocked',
> 3,mylastrecid);
> exception
> when others then
> print 'something went wrong'
> end;
try it as workarund:
exception
when 0 then
print 'dummy'
when others then
print 'something went wrong'
end;
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
More information about the Valentina
mailing list