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.GetPersonPhoneInBlock ====== <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"."GetPersonPhoneInBlock" IS {create function GetPersonPhoneInBlock /* Application Maintained Function / Procedure - DO NOT EDIT*/ (in reqpersonid char(20)) returns long varchar begin declare phones long varchar; declare newline char(2); declare loopcounter tinyint; declare tab char(1); declare TabString char(2); set newline="char"(13)+"char"(10); set phones=''; set loopcounter=0; set tab="char"(9); for fetchfor as fetchcursor no scroll cursor for select phonetype.name as nextname,phone.number as nextnumber from phone key join phonetype where phone.who = 'P' and whoid = reqpersonid order by phone.whoid asc,phonetype.sortorder asc,phonetype.name asc for read only do if loopcounter > 0 then set phones=phones || newline end if; if length(nextname) < 8 then set TabString=Tab+Tab else set TabString=Tab end if; set phones=phones || nextname || TabString || nextnumber; set loopcounter=loopcounter+1 end for; return phones end } </code> database/procedures/pears_getpersonphoneinblock.txt Last modified: 2026/08/07 19:24by 127.0.0.1