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.NetOwnerTimesheetCandidateSearch ====== <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 procedure "pears"."NetOwnerTimesheetCandidateSearch"( in "pWebUserID" char(20),in "SearchValue" char(20) default '%' ) result( "PersonID" char(20),"Name" char(61),"Address" char(82) ) begin declare "DivID" char(20); declare "CurrentStates" char(30); set "DivID" = (select first "staff"."divisionid" from "iqxnetuser" key join "staff" where "iqxnetuser"."iqxnetuserid" = "pWebUserID"); set "CurrentStates" = "string"('[',(select first "PersonCurrentStates" from "params"),']'); set "SearchValue" = "replace"("SearchValue",'*','%'); select "person"."personid" as "PersonID", "person"."forenames"+' '+"person"."surname" as "Name", "GetPersonAddressOnLine"("person"."personid") as "Address" from "person" where "person"."divisionid" = "DivID" and "person"."status" like "CurrentStates" and "person"."keyname" like "SearchValue"+'%' order by "KeyName" asc end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetOwnerTimesheetCandidateSearch" IS {create procedure pears."NetOwnerTimesheetCandidateSearch"( in "pWebUserID" char(20),in "SearchValue" char(20) default '%' ) result( "PersonID" char(20),"Name" char(61),"Address" char(82) ) begin declare "DivID" char(20); declare "CurrentStates" char(30); set "DivID" = (select first "staff"."divisionid" from "iqxnetuser" key join "staff" where "iqxnetuser"."iqxnetuserid" = "pWebUserID"); set "CurrentStates" = "string"('[',(select first "PersonCurrentStates" from "params"),']'); set "SearchValue" = "replace"("SearchValue",'*','%'); select "person"."personid" as "PersonID", "person"."forenames"+' '+"person"."surname" as "Name", "GetPersonAddressOnLine"("person"."personid") as "Address" from "person" where "person"."divisionid" = "DivID" and "person"."status" like "CurrentStates" and "person"."keyname" like "SearchValue"+'%' order by "KeyName" asc end } </code> database/procedures/pears_netownertimesheetcandidatesearch.txt Last modified: 2026/08/07 19:24by 127.0.0.1