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.proper ====== <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> COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."proper" IS {create function proper /* Application Maintained Function / Procedure - DO NOT EDIT*/ (in OldString char(255)) returns char(255) begin declare NewString char(255); declare StringLength smallint; declare CurrentChar char(1); declare LastChar char(1); declare CurrentPos smallint; if OldString is null then return(null) end if; set oldstring=lower(oldstring); set stringlength=length(OldString); set CurrentPos=1; set NewString=''; process: loop set CurrentChar=substr(OldString,CurrentPos,1); if CurrentPos = 1 then set currentchar=upper(currentchar) else set LastChar=substr(OldString,CurrentPos-1,1); if ascii(lower(lastchar)) not between 97 and 122 and(ascii(lastchar) not between 128 and 154) and(ascii(lastchar) not between 160 and 165) then set CurrentChar=upper(CurrentChar) end if end if; set NEWString=Newstring || CurrentChar; set CurrentPos=CurrentPos+1; if CurrentPos > StringLength then leave process end if end loop process; return(NewString) end } </code> database/procedures/pears_proper.txt Last modified: 2026/08/07 19:24by 127.0.0.1