unexpected token: when + bug in sqleditor
Bart Pietercil
bart.pietercil at gmail.com
Fri Sep 21 00:56:30 CDT 2007
On 20-sep-07, at 21:39, Ivan Smahin wrote:
> 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;
>
problem started already when I had this
exception
print 'this'
end
same for
exception
print 'this';
end
Error: Kernel error: 0x71000. line 10:2: unexpected token: print
This worked
exception
when 50000 then
print 'dummy';
when others then
print 'something went wrong';
end
I modified the placement of the ;. In the exceptions shown in the
WIKI page the ; is also wrong.
Why is a simple print 'sdfjsdf'; is not acceptable ?
Bart
More information about the Valentina
mailing list