[firebase-br] O que está errado nessa Procedure

Luciano franca luapfirebird em yahoo.com.br
Sex Ago 2 18:21:55 -03 2013


create or alter procedure Proc_RemoveChar(
    Texto varchar(255))
returns (
    Resultado varchar(255))
as
declare variable I Integer;
declare variable Aux Char(255);
declare variable Str Char(255);
begin

 Resultado = '';
 Str = '';
 I = 1;

 While ( i <= char_length(:Texto) ) do begin
  Aux = Trim (substring(:Texto from i for 1));
   if (Aux in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')) then
     Str = :Str || :Aux;

   i = i + 1;
  End

 Resultado = :Str;
 suspend;

end



Mais detalhes sobre a lista de discussão lista