Subject Re: [firebird-support] Position Function
Author Paul Vinkenoog
"thedevguy" wrote:

> 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 ^^ ;
> 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 ; ^^

I suppose that DBW does some checking of its own - maybe your version isn't up to date with Firebird 2.5 yet?


Cheers,
Paul Vinkenoog