Subject Position Function
Author thedevguy
I'm using Firebird 2.5 and Database Workbench for management. I'm trying to write a SP using the POSITION function but it keeps complaining 'undeclared identifier: 'POSITION'. From reading the documentation this should be a built in function. Am I wrong?

SET TERM ^^ ;
CREATE PROCEDURE SP_SPLITNAMES
AS
DECLARE VARIABLE MYNAME VARCHAR(30);
DECLARE VARIABLE VPOS INTEGER;
begin
FOR SELECT NAME FROM NAMETABLE INTO :MYNAME DO
BEGIN
/* FIND FIRST SPACE */
VPOS = POSITION('TEST', 'TEST ME');
END
end ^^
SET TERM ; ^^