Q_DEPT
------
SELECT * FROM DEPT
ORDER BY DEPTNO


Q_EMP
-----
SELECT DEPTNO, ENAME, JOB FROM EMP
ORDER BY ENAME



DETAIL_VAL Formula Column
-------------------------
function DETAIL_VALFormula return Number is
begin
  return(1);
end;


M_G_DEPTNO1_HDR Format Trigger
------------------------------
function M_G_DEPTNO1_HDRFormatTrigger return boolean is
begin
  if :count_detail=0 then
     return (FALSE);
  else
     return (TRUE);
  end if;
end;