====== pears.NetDepartmentList ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create procedure "pears"."NetDepartmentList"( in "pWebUserID" char(20),in "pDivisionID" char(20) )
result( "DepartmentID" char(20),"DepartmentName" char(60) )
// IQXWeb
begin
select "d"."departmentid",
"d"."name"
from "department" as "d"
where("d"."divisionid" = "pDivisionID" or "d"."divisionid" is null)
and "d"."publishtoweb" = 1
order by "d"."name" asc
end /*DOC
2017-08-09 PC create a list of departments within a division which are enabled for web
2018-05-03 VHS/MHS include departments which are non-divisional
*/
go
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetDepartmentList" IS
{create PROCEDURE pears."NetDepartmentList"(in pWebUserID char(20),in pDivisionID char(20) )
RESULT(DepartmentID char(20),DepartmentName char(60))
// IQXWeb
BEGIN
select
d.departmentid,
d.name
from
department d
where
(d.divisionid=pDivisionID or d.divisionid is null)
and d.publishtoweb=1
order by d.name
END
/*DOC
2017-08-09 PC create a list of departments within a division which are enabled for web
2018-05-03 VHS/MHS include departments which are non-divisional
*/
}