Subject Using strings with Firebird 1.5 ! FAQs
Author grndeveloper
It is possible to use a procedure to parse an array from a field
database(a varchar for example) accessing to the letters like an array
of chars?

My objective is to parse a field of a database to get some information
inside!. i'll reproduce a part of
representative code to explain the idea:


/* wrong procedure */
CREATE PROCEDURE PR_EXTREU_DATE (pi_CAD varchar(240))
RETURNS (po_ADRECA VARCHAR(200))
AS
DECLARE VARIABLE v_COMPTADOR SMALLINT;
begin
po_ADRECA = '';
v_COMPTADOR = 0;

while (pi_CAD[:v_COMPTADOR] <> '*') do
begin
po_ADRECA = po_ADRECA || pi_CAD[:v_COMPTADOR];
v_COMPTADOR = v_COMPTADOR + 1;
end

suspend;
end

In this procedure, the intention, is pass a field of a database, and
parse it into another string.

Thanks for all!