showing results for - "oracle store procedure error handling json file"
Allison
06 May 2019
1DECLARE
2   CURSOR species_cur
3   IS
4      SELECT id, sp.info
5        FROM json_species sp;
6 
7   l_info              json_element_t;
8   l_document_object   json_object_t;
9   l_name              json_element_t;
10BEGIN
11   FOR rec IN species_cur
12   LOOP
13      l_info := json_element_t.parse (rec.info);
14      l_document_object := TREAT (l_info AS json_object_t);
15      l_name := l_document_object.get ('name');
16 
17      dbms_output.put_line (l_name.to_string);
18   end loop;
19END;
20/
21