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.StaffInfo ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Description ===== View - Adds Branch - Division etc information to StaffID and name. ===== Original SQL ===== <code sql> create view "pears"."StaffInfo"( "staffid", "name","title","shortid","tempdesk","division","agency","department" ) as select "staff"."staffid","staff"."name","staff"."title","staff"."shortid", (select "tempdesk"."name" from "pears"."tempdesk" where "staff"."tempdeskid" = "tempdesk"."tempdeskid"), (select "division"."name" from "pears"."division" where "staff"."divisionid" = "division"."divisionid"), (select "agencydetails"."name" from "pears"."agencydetails" where "staff"."agencyid" = "agencydetails"."agencyid"), (select "department"."name" from "pears"."department" where "staff"."defaultdepartid" = "department"."departmentid") from "pears"."staff" go COMMENT ON VIEW "pears"."StaffInfo" IS 'View - Adds Branch - Division etc information to StaffID and name.' go COMMENT TO PRESERVE FORMAT ON VIEW "pears"."StaffInfo" IS {create view StaffInfo (staffid,"name",title,shortid,tempdesk,division,agency,department) as select staffid,"name",title,shortid, (select "name" from pears.tempdesk where staff.tempdeskid=tempdesk.tempdeskid), (select "name" from pears.division where staff.divisionid=division.divisionid), (select "name" from pears.agencydetails where staff.agencyid=agencydetails.agencyid), (select "name" from pears.department where staff.defaultdepartid=department.departmentid) from pears.staff } </code> database/views/pears_staffinfo.txt Last modified: 2026/08/07 19:24by 127.0.0.1