Subject Re: [firebird-support] Stored procedure question
Author Lucas Franzen
Michael,

Michael Vilhelmsen schrieb:

> hi
>
> Is it posible in a stored procedure to do someting like this:
>
> for MyVar=1 to length(MyField) do
> begin
> if (MyField[MyVar]='G' then
> something to do.....
> end;

If it that you just want to know if one (regradless which one) Char of
the String is a "G" you can use:

IF ( MYFIELD LIKE '%G%' ) THEN
BEGIN
END

If the case doesn't matter you can use:
IF ( MYFIELD containing 'G' ) THEN
BEGIN
END


If you need to know if the 3rd Character is a G you can use:
IF ( MYFIELD LIKE '__G%' ) THEN
BEGIN
END


Luc.