R_Al.op_record is a user defined RECORD type in oracle. I can not compile the following code. What I want is to convert the user defined RECORD type in to an xml or json without referring to its attributes one by one. Is this possible to do? Can we do this using dynamic sql?
The compilation error i get is .....Error: PLS-00306: wrong number or types of arguments in call to 'XMLTYPE'
TYPE op_record IS RECORD (
operation_row_count BINARY_INTEGER,
operation_id_tab number_type,
operation_no_tab number_type,
operation_description_tab char_50_type);
PROCEDURE Update_S(
op_rec_ IN R_Al.op_record)
IS
v_xml SYS.XMLTYPE;
mytype R_Al.op_record;
BEGIN
mytype := op_rec_;
v_xml := xmltype(mytype);
END Update_S;