Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
CREATE FUNCTION "pears"."digitsonly"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ IN "s" CHAR(100) ) RETURNS CHAR(100) BEGIN DECLARE "rv" CHAR(100); DECLARE "c" CHAR(1); DECLARE "i" SMALLINT; SET "rv" = ''; SET "i" = 1; while "i" <= "length"("s") loop SET "c" = "substr"("s","i",1); IF "c" LIKE '[0123456789]' THEN SET "rv" = "rv"+"c" END IF; SET "i" = "i"+1 END loop; RETURN("rv") END