cancel
Showing results for 
Search instead for 
Did you mean: 

Text Mining - Calling function inside procedure

Former Member
0 Kudos

Hi - I have been playing with this SQLScript forever but cannot seem to figure why it is not working. I am getting the error "index out of bounds: param index exceeded the param size 0, but 1". Here is the code. I am trying to run the TM_GET_RELEVANT_TERMS function over all of my documents, this procedure passes an integer to the function to identify what document (pk_ID) I want the function to run for.

It works fine when I replace "DOCUMENT IN FULLTEXT INDEX WHERE "pk_ID" = :ID2" with

"DOCUMENT IN FULLTEXT INDEX WHERE "pk_ID" = 2"

DROP PROCEDURE "P_MT";
CREATE PROCEDURE "P_MT" (IN    ID2    INTEGER) LANGUAGE SQLSCRIPT AS
/*********BEGIN PROCEDURE SCRIPT ************/
BEGIN

		    SELECT RANK, NORMALIZED_TERM
		    
		    FROM TM_GET_RELEVANT_TERMS (
			DOCUMENT IN FULLTEXT INDEX WHERE "pk_ID" = :ID2
			SEARCH "Description" FROM "SYSTEM"."t_sr" 
			RETURN TOP 200
			) AS T;
		
END;


call "P_MT"(1);

Accepted Solutions (0)

Answers (1)

Answers (1)

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi Matthew,

Strange. I can't see why this would not work. Do you mind sharing your catalog information (create SQL + some data) ?

BRs,
Lucas de Oliveira