Posts

Showing posts with the label Nested Tables

Nested Tables in PPAS 8.4

Some people ask this, How to use the Nested tables in PPAS? Since there is no Constructor Function Available and Oracle Compatibility Documentation is based on Procedure/Functions. So, I thought to give an overview on this. We can use nested tables by creating some manual Constructor and Using those constructor function to fetch the data or inserting the data: Following is an example: create type test_type as object (col1 varchar(200)); create type nested_type as table of test_type; create table test_nested(col1 nested_type); Now, Create some constructor Functions which can convert the data types as given below: --- Constructor Function of test_type CREATE OR REPLACE FUNCTION test_type(varchar) return test_type as declare result test_type; Begin result=row($1); return result; END; And --Constructor Function of nested_type CREATE OR REPLACE FUNCTION nested_type(test_type[]) return nested_type as counter integer:=0; rec test_type; result nested_type; BEGIN for rec i