Subject | Re: [firebird-support] SP Dialect independant |
---|---|
Author | Nick Upson |
Post date | 2005-02-17T17:25:51Z |
In article <002001c51454$ef5b17a0$0a0110ac@prenosil>, Ivan Prenosil wrote:
--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly
> CREATE OR ALTER PROCEDURE P (VAL INTEGER) RETURNS (RET INTEGER) ASthanks, I hadn't thought of doing it that way
> 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
--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly