11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

*/<br />

rg_id := Find_Group(rg_name);<br />

/*<br />

** If it does not exist, create it and add the two<br />

** necessary columns to it.<br />

*/<br />

IF Id_Null(rg_id) THEN<br />

rg_id := Create_Group(rg_name);<br />

/* Add two number columns to the record group */<br />

gc_id := Add_Group_Column(rg_id, ’Base_Sal_Range’,<br />

NUMBER_COLUMN);<br />

gc_id := Add_Group_Column(rg_id, ’Emps_In_Range’,<br />

NUMBER_COLUMN);<br />

END IF;<br />

/*<br />

** Populate group with a query<br />

*/<br />

errcode := Populate_Group_With_Query( rg_id,<br />

’SELECT SAL-MOD(SAL,1000),COUNT(EMPNO) ’<br />

||’FROM EMP ’<br />

||’GROUP BY SAL-MOD(SAL,1000) ’<br />

||’ORDER BY 1’);<br />

END;<br />

57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!