|Subject||Re: [firebird-support] Position Function|
> 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?No, you're right. But it's not Firebird that is complaining. I can create this SP without trouble (if I remove the reference to NAMETABLE).
> SET TERM ^^ ;I suppose that DBW does some checking of its own - maybe your version isn't up to date with Firebird 2.5 yet?
> CREATE PROCEDURE SP_SPLITNAMES
> DECLARE VARIABLE MYNAME VARCHAR(30);
> DECLARE VARIABLE VPOS INTEGER;
> FOR SELECT NAME FROM NAMETABLE INTO :MYNAME DO
> /* FIND FIRST SPACE */
> VPOS = POSITION('TEST', 'TEST ME');
> end ^^
> SET TERM ; ^^