pears.depttran

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Original SQL

COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."depttran" IS 
{CREATE FUNCTION pears.depttran(IN deptu CHAR(1))
RETURNS CHAR(2)
BEGIN
  DECLARE rv CHAR(2);
  CASE deptu WHEN '0' THEN
    SET rv='0' WHEN 'B' THEN
    SET rv='CN' WHEN 'H' THEN
    SET rv='CT' WHEN 'J' THEN
    SET rv='CU' WHEN 'G' THEN
    SET rv='DR' WHEN 'A' THEN
    SET rv='EN' WHEN 'C' THEN
    SET rv='FA' WHEN 'F' THEN
    SET rv='MI' WHEN 'E' THEN
    SET rv='WR'
  ELSE
    SET rv='ZC'
  END CASE
  ;
  RETURN(rv)
END
}