oracle - How to Copy data from table with a nested table column -


I have a table that has a column in the form of nested table.

I want to copy the data of this table in the second, how we choose the INSERT section, it seems challenging:

Consider the field which is the nested table, the phone_list whose Type is a user defined type "TBL_PHONE_EXTN", which is a table of "typ_phone_extn". Type

  or type _phone_pen as the object (phone_number VARCHAR2 (20), extension VARCHAR2 (10)); / Type or type tbl_phone_extn as the command of typ_phone_extn; /   

clearly fails below: (ORA-90094 :: with invalid identifier) ​​

  sch2.sub_pat_address (INSPIRE) at pat_address_id , Pat_id, ** phone_list, ** last_updated_by) SELECT pat_address_id, pat_id, ** phone_list, ** last_updated_by by sch1.sub_pat_address;   

then I try:

  SE1, pat_idress_id, pat_id, ** tbl_phone_extn (typ_phone_extn (phone_number, extension)), ** last_updated_by by sch1 Sub_pat_address, ** table (phone_list) **;   

What does the nested table do when I end up with more records than I want - that is, if a specific pat_address_id had a phone_list of 5 phones, then this 5 records in combination Gives me and can not be put to me

So the question is, how to put nested (nested table column) and put it in the new table? Well, CTAS can be an option, but it requires a whole new table instead of INSERT. Any help would be greatly appreciated.

You can use unnecessary elements to rejoin the nested table, its actual collection type Back to Casting: Submit (collect_phone_extn (phone_number, extension)) as the SELECT pat_address_id, pat_id, cast (tb_phone_extn), last_updated_by sch1.sub_pat_address, table (phone_list) GROUP by pat_address_id, Pat_id, last_updated_by;

And then you can use that to put your own, obviously.

The only reason is that you can see that there will be a problem with your basic simple entry. Each schema had its own type and their tables were created using their own types, but then you have the ORA -00932: Inadequate Datatype or ORA-01031: ORA-00904 rather than insufficient privileges is received.

Even if you have a privilege on the types of schema, then Oracle UDT will have to type Precise - not enough for them to be equally constructed. If they have separate entries in ALL_OBJECTS , then they are not interchangeable.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -