====== pears.NetReportCombo_ClientSite ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create procedure "pears"."NetReportCombo_ClientSite"( in "pWebUserID" char(20) ) result( "Description" char(250),"Value" char(250),"SortStr" char(250) ) begin select distinct "getCompanyAddressOnline"("company"."companyid") as "Descr","company"."companyid",if("isnumeric"("left"("Descr",1)) = 1) then "right"("Descr","length"("Descr")-"charindex"(' ',"Descr")) else "Descr" endif as "SortStr" from "company" key join "employment" key join "iqxnetuserlink" where "iqxnetuserlink"."iqxnetuserid" = "pWebUserID" order by "SortStr" asc end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetReportCombo_ClientSite" IS {create procedure pears.NetReportCombo_ClientSite(in pWebUserID char(20)) result(Description char(250),Value char(250),SortStr char(250)) begin select distinct getCompanyAddressOnline(company.companyid) as Descr,company.companyid,if(isnumeric("left"(Descr,1)) = 1) then "right"(Descr,length(Descr)-charindex(' ',Descr)) else Descr endif as SortStr from company key join employment key join iqxnetuserlink where iqxnetuserlink.iqxnetuserid = pWebUserID order by SortStr asc end }