cancel
Showing results for 
Search instead for 
Did you mean: 

input parameter error in the store procedure

former_member197620
Participant

Hi all,

I call another store procedure B in the store procedure A. When I active the store procedure A , the error is the following:

Could not create catalog object: feature not supported; Only table variable is allowed in input parameter in a nested call: line 37 col 26 (at pos 1435)

The line 37 is "CALL SYSTEM.PAL_DBSCAN(_SYS_BIC.PAL_DBSCAN_DATA_TBL, _SYS_BIC.PAL_CONTROL_TBL, BASE.PAL_CHAINSTORE_DBSCAN_RESULTS_TBL) with overview; "

The SQL Script is performed successfully in the SQL console.  The SQL Script is wrong in a procedure.

Could you help me?

Thanks.

Candy Zhang

Accepted Solutions (1)

Accepted Solutions (1)

Archana
Product and Topic Expert
Product and Topic Expert

Hello Candy Zhang,

If you are calling Procedure B in procedure A and Procedure B has IN params then these parameters must be first stored in a variable and then that variable must be referred. In your case,

TBL1 := _SYS_BIC.PAL_DBSCAN_DATA_TBL

TBL2 := _SYS_BIC.PAL_CONTROL_TBL

TBL3 := BASE.PAL_CHAINSTORE_DBSCAN_RESULTS_TBL

and then call the procedure as :

CALL SYSTEM.PAL_DBSCAN(:TBL1, :TBL2, :TBL3);

Also ensure that these tables passed as IN params are tabletype


Regards,

Archana

former_member197620
Participant
0 Kudos

Hi Archana,

I see what you mean. But In my question, I want the result can be inserted into the table BASE.PAL_CHAINSTORE_DBSCAN_RESULTS_TBL. I use "with overview", it is not work.

Regards,

Candy

SergioG_TX
Active Contributor
0 Kudos
former_member197620
Participant
0 Kudos

Hi Sergio,

I use the following way :

TBL1 := _SYS_BIC.PAL_DBSCAN_DATA_TBL

TBL2 := _SYS_BIC.PAL_CONTROL_TBL

TBL3 := BASE.PAL_CHAINSTORE_DBSCAN_RESULTS_TBL

CALL SYSTEM.PAL_DBSCAN(:TBL1, :TBL2, :TBL3);

INSERT INTO BASE.PAL_CHAINSTORE_DBSCAN_RESULTS_TBL SELECT * FROM :TBL3;


"with overview" is not work In a stored procedure, It is only work in the SQL console. Right?


Brs,

Candy Zhang

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Candy Zhang,

Please ensure that your procedure in not READ ONLY. In that case you are not allowed to do CRUD operations. For example, you procedure definition should look like the follow :

PROCEDURE "<SCHEMA-NAME>"."<PACKAGE-NAME>::<PROC-NAME>"
( <IN/OUT PARAMS> )

  LANGUAGE SQLSCRIPT

  SQL SECURITY <INVOKER/DEFINER> AS 

BEGIN

..............

END;

Regards,

Archana

former_member197620
Participant
0 Kudos

Hi Archana,


My procedure is not READ ONLY.  In my procedure the following SQL work very good.


INSERT INTO BASE.PAL_CHAINSTORE_DBSCAN_RESULTS_TBL SELECT * FROM :TBL3;



Regards,

Candy Zhang



Answers (0)