Oracle Magazine, September/October 2018
Database Developer PL SQL ORACLE MAGAZINE SEPTEMBER OCTOBER 2018 61 STK218 06 JUL 18 O 218 STK218 06 JUL 18 C 233 STK219 06 JUL 18 O 219 A TWO STEP TRANSFORMATION In my two step transformation I will create a function that returns a nested table of elements that matches the stocks table So I will need an object type and a nested table type CREATE OR REPLACE TYPE stock_ ot AUTHID DEFINER IS OBJECT ticker VARCHAR2 20 trade_ date DATE opening_ price NUMBER closing_ price NUMBER CREATE OR REPLACE TYPE stocks_ nt AS TABLE OF stock_ ot Now I create a table function that accepts a cursor variable each of whose rows contains ticker data and returns a nested table each of whose elements looks like a row in the stocks table Because it follows precisely the same pattern as the doubled function I will not describe the individual lines
You must have JavaScript enabled to view digital editions.