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.ShiftOrderReasons ====== <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"."ShiftOrderReasons"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "DeptID" char(2) ) result( "description" char(50),"tempshiftorderreasonid" char(20),"sortorder" smallint ) begin select "description","tempshiftorderreason"."tempshiftorderreasonid","sortorder" from "tempshiftorderreason" key join "tempshiftorderreasondepartment" where "departmentid" = "DeptID" union select "description","tempshiftorderreason"."tempshiftorderreasonid","sortorder" from "tempshiftorderreason" where not exists(select * from "tempshiftorderreasondepartment" where "tempshiftorderreasonid" = "tempshiftorderreason"."tempshiftorderreasonid") order by "sortorder" asc end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."ShiftOrderReasons" IS {create procedure ShiftOrderReasons /* Application Maintained Function / Procedure - DO NOT EDIT*/ ( in DeptID char(2) ) result( description char(50),tempshiftorderreasonid char(20),sortorder smallint ) begin select description,tempshiftorderreason.tempshiftorderreasonid,sortorder from tempshiftorderreason key join tempshiftorderreasondepartment where departmentid = DeptID union select description,tempshiftorderreason.tempshiftorderreasonid,sortorder from tempshiftorderreason where not exists(select * from tempshiftorderreasondepartment where tempshiftorderreasonid = tempshiftorderreason.tempshiftorderreasonid) order by sortorder asc end } </code> database/procedures/pears_shiftorderreasons.txt Last modified: 2026/08/07 19:24by 127.0.0.1