pears.digitsonly

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
  • database/functions/pears_digitsonly.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1