Nested Table Query

From: The Magnet <art_at_unsu.com>
Date: Tue, 11 Sep 2012 07:08:59 -0700 (PDT)
Message-ID: <5d8a33e9-8100-43ef-ab62-221de757062e_at_a7g2000yqo.googlegroups.com>



Hi,

I'm trying to do a INSERT INTO (SELECT........

The table I am inserting into and the table I am selecting from have the exact same layout. However, both tables have nested tables within. I'm having such a hard time finding the right SQL syntax. All the examples I am finding use literals to insert into the nested table. Here, I am trying to select from one table and insert into another.

Table 1



Column 1
Column 2
Nested Table 1

   Nested Column 1
   Nested Column 2

Table 2



Column 1
Column 2
Nested Table 1

   Nested Column 1
   Nested Column 2

INSERT INTO table2
  SELECT t1.column1, t2.column2, n1.nested_column1, n1.nested_column2   FROM table1 t1, TABLE(nested_table1) n1;

That did not work. Can anyone help with the syntax?

Thanks! Received on Tue Sep 11 2012 - 09:08:59 CDT

Original text of this message