Error checking // FEW records at once
Bart Pietercil
bart.pietercil at gmail.com
Fri Sep 21 04:42:20 CDT 2007
On 21-sep-07, at 11:31, Ruslan Zasukhin wrote:
> On 21/9/07 12:26 PM, "Bart Pietercil" <bart.pietercil at gmail.com>
> wrote:
>
>> Hmm, I adapted the sp
>>
>> create or replace procedure cm_spBuildUserTypes()
>> begin
>> DECLARE mylastrecid Long;
>> insert into tbl_typelists(created_by,typelistname) values
>> ('cm_spBuildUserTypes','usertypes');
>> set mylastrecid = select recid FROM tbl_typelists where typelistname
>> = 'usertypes';
>> insert into tbl_typelistvalues
>> (displayname,listvalue,objptr_typelist) values ('active',
>> 1,mylastrecid),
>> ('deactivated',2,mylastrecid),
>> ('blocked',3,mylastrecid);
>> exception
>> when 50000 then
>> print 'dummy';
>> when others then
>> print 'something went wrong';
>> end
>>
>> which is refused by the parser, the console gives:
>>
>> Kernel error: 0x21502. It's too much values.
>
> Try wrap all by ()
>
> I need check now self, but should works
>
create or replace procedure cm_spBuildUserTypes()
begin
DECLARE mylastrecid Long;
insert into tbl_typelists(created_by,typelistname) values
('cm_spBuildUserTypes','usertypes');
set mylastrecid = select recid FROM tbl_typelists where typelistname
= 'usertypes';
insert into tbl_typelistvalues
(displayname,listvalue,objptr_typelist) values(('active',
1,mylastrecid),('deactivated',2,mylastrecid),('blocked',3,mylastrecid));
exception
when 50000 then
print 'dummy';
when others then
print 'something went wrong';
end
nope
Error: Kernel error: 0x71000. line 6:88: expecting ')', found ','
Bart
More information about the Valentina
mailing list