darkman0101
Technical User
Hi there.
I'm a bit stumped.
I'm trying to create a Stored Proc that will create some temporary tables on the fly.
The thing is that the data that populates those tables has selection criteria where one of the values comes from a parameter passed into the proc.
For Example:
Create Procedure dev_jm/CATSLERPT1
(pParamin Dec(4))
LANGUAGE SQL
MODIFIES SQL DATA
SET OPTION DBGVIEW = *SOURCE
BEGIN
create table testdual as (select * from dual
where ID = pParamIn) with data;
END;
Gives the error:
SQL0205 30 10 Position 71 Column pParamIn not in table DUAL in DEV_JM.
It's like the variable is out of the scope of the create table statement.
If I remove the create table clause the proc will compile fine.
I can't find this "limitation" documented anywhere.
Can someone enlighten me?
Cheers,
Jas
I'm a bit stumped.
I'm trying to create a Stored Proc that will create some temporary tables on the fly.
The thing is that the data that populates those tables has selection criteria where one of the values comes from a parameter passed into the proc.
For Example:
Create Procedure dev_jm/CATSLERPT1
(pParamin Dec(4))
LANGUAGE SQL
MODIFIES SQL DATA
SET OPTION DBGVIEW = *SOURCE
BEGIN
create table testdual as (select * from dual
where ID = pParamIn) with data;
END;
Gives the error:
SQL0205 30 10 Position 71 Column pParamIn not in table DUAL in DEV_JM.
It's like the variable is out of the scope of the create table statement.
If I remove the create table clause the proc will compile fine.
I can't find this "limitation" documented anywhere.
Can someone enlighten me?
Cheers,
Jas