Subject Re: [firebird-support] SP Dialect independant
Author Nick Upson
In article <002001c51454$ef5b17a0$0a0110ac@prenosil>, Ivan Prenosil wrote:
> CREATE OR ALTER PROCEDURE P (VAL INTEGER) RETURNS (RET INTEGER) AS
> DECLARE VARIABLE HHMM VARCHAR(5);
> BEGIN
> HHMM = VAL;
> WHILE (HHMM NOT LIKE '____%') DO HHMM = '0' || HHMM;
> RET = 60 * CAST(SUBSTRING(HHMM FROM 1 FOR 2) AS INTEGER)
> + CAST(SUBSTRING(HHMM FROM 3 FOR 2) AS INTEGER);
> END

thanks, I hadn't thought of doing it that way

--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly