====== pears.NetOwnerConsultantList ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create procedure "pears"."NetOwnerConsultantList"( in "pWebUserID" char(20) )
result( "id" char(20),"name" char(100),"isMe" integer )
// IQXWeb
begin
select "staff"."staffid" as "consultantID",
"staff"."name" as "name",
(if "staff"."staffid" = "UserStaffID" then 1 else 0 endif) as "isMe"
from "staff"
where "isnull"("staff"."defunct",0) = 0
and "staff"."divisionid" = any(select "divisionid" from "dashboardstaffdivisions"())
order by "staff"."name" asc
end /* DOC
2019-07-19 ET IW-974 Created new procedure to return a list of cunsultants for which a consultant has division access for.
*/
go
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetOwnerConsultantList" IS
{create PROCEDURE pears."NetOwnerConsultantList"(in pWebUserID char(20) )
RESULT(id char(20), name char(100), isMe integer)
// IQXWeb
BEGIN
select
staff.staffid as consultantID,
staff.name as name,
(if staff.staffid=UserStaffID then 1 else 0 endif) as isMe
from
staff
where
isnull(staff.defunct,0)=0
and staff.divisionid in (select divisionid from dashboardstaffdivisions())
order by
staff.name asc
END
/* DOC
2019-07-19 ET IW-974 Created new procedure to return a list of cunsultants for which a consultant has division access for.
*/
}