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.contactlink ====== <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"."contactlink" IS {create function contactlink /* Application Maintained Function / Procedure - DO NOT EDIT*/ (in sempid char(20),in spersid char(20),in sfromwho char(1),in stowho char(1)) returns char(50) begin declare rv char(50); if(sempid is null or spersid is null) and not(sfromwho = 'A' and spersid is null) then return('') end if; set rv=''; if sfromwho = 'A' then set rv=(select company.name from company key join employment where employment.employmentid = sempid); set rv="char"(58)+' '+rv; if stowho = 'C' or spersid is null then set rv='To' || rv elseif stowho = 'A' then set rv='Re' || rv else set rv='With' || rv end if else set rv=(select person.name from person where person.personid = spersid); set rv="char"(58)+' '+rv; if stowho = 'A' then set rv='To' || rv elseif stowho = 'C' then set rv='Re' || rv else set rv='With' || rv end if end if; return(rv) end } </code> database/procedures/pears_contactlink.txt Last modified: 2026/08/07 19:24by 127.0.0.1