variables stored procedure

Ivan Smahin ivan_smahin at paradigmasoft.com
Wed Oct 3 09:02:02 CDT 2007


Hello Danny,

Wednesday, October 3, 2007, 10:40:07 AM, you wrote:

> Hi List,

> I'm trying to create this stored procedure:

> create or replace procedure ct_select_competences_module(in  
> intModuleID long, IN intOrganisationID LONG, IN strSelectList VARCHAR)
> Begin
>         CASE strSelectList
>         WHEN 'Module' THEN
>                 SElect RecID, objptr_module, objptr_comppool->name As competence_name,
>                 objptr_comppool->description As comp_description FROM
> tbl_comppool_modules
>                 WHERE objptr_module = intModuleID;
>         WHEN 'All' THEN
>                 SELECT RecID, name, description FROM tbl_competence_pool
>                 WHERE RecID NOT IN (SELECT objptr_comppool FROM  
> tbl_comppool_modules WHERE objptr_module = intModuleID) AND  
> objptr_organisation = intOrganisationID;
>         END CASE
> END

> but, I get an error (of course   :

> 09:31:19: Error: Kernel error: 0x51500. Identifier "intModuleID" is  
> not found.

> Seems that the second time I use 'intModuleID' (in the sub-select),  
> it doesn't recognize that variable anymore... If I ONLY replace  
> intModuleID in the SUBSELECT BY 1 (or something like that), the  
> stored procedure is created...


> What am I doing wrong?

Obviously, it is a bug. Report it to mantis please.


-- 
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