variables stored procedure
Danny Lewkin
daniel.lewkin at cognosis.be
Wed Oct 3 02:40:07 CDT 2007
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?
Greetz,
Danny
More information about the Valentina
mailing list