home *** CD-ROM | disk | FTP | other *** search
- rem
- rem $Header: examp5.sql,v 1002100.2 90/01/11 16:56:00 nsalah Exp $ examp5.sql Copyr (c) 1989 Oracle
- rem
- rem V6PLS10021,DISK$DEV9:[PLS.DEMO.10021]
- /*
- ** This block does some numeric processing on data that is
- ** stored in data_table that comes from experiment #1. The
- ** results are stored in the TEMP table.
- **
- ** Copyright (c) 1989 Oracle Corporation
- */
-
- DECLARE
- result temp.col1%TYPE;
- CURSOR c1 IS
- SELECT n1, n2, n3 FROM data_table
- WHERE exper_num = 1;
- BEGIN
- FOR c1_rec IN c1 LOOP
- /* calculate and store the results */
- result := c1_rec.n2 / (c1_rec.n1 + c1_rec.n3);
- INSERT INTO temp VALUES (result, null, null);
- END LOOP;
- COMMIT;
- END;
- /
-