Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.Base36 ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> create function "pears"."Base36"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "seed" integer,in "digits" smallint ) returns char(20) begin declare "rv" char(20); declare "m" integer; set "rv" = ''; if(("digits" > 20) or("digits" < 1)) then set "digits" = 20 end if; while "seed" > 0 loop set "m" = "mod"("seed",36); if "m" < 10 then set "rv" = "char"("m"+48) || "rv" else set "rv" = "char"("m"+55) || "rv" end if; set "seed" = "seed"/36 end loop; while "length"("rv") < "digits" loop set "rv" = '0' || "rv" end loop; return("rv") end </code> database/functions/pears_base36.txt Last modified: 2026/08/07 19:24by 127.0.0.1