INSERT and WITH
Date: Thu, 30 Apr 2009 02:11:10 -0700 (PDT)
Message-ID: <a22dfda0-731e-4239-a1c4-fd9db03b912b_at_z23g2000prd.googlegroups.com>
Hello,
I wrote a statement that contains a WITH clause:
SQL A: WITH ... AS adata SELECT ... FROM adata
It works fine. Now I wanted to insert the result into a table
SQL B: INSERT INTO tableA (col1, col2 .....) (WITH ... AS adata SELECT ... FROM adata)
While the SQL A works fine, SQL B does not work. In SQL Developer simply nothing happens, my DBA tells me that he got the error message "ORA-32034: unsupported use of WITH clause".
I also tried something like:
SQL C: WITH ... AS adata INSERT INTO tableA (col1, col2 .....) (SELECT ... FROM adata)
But now I get an "ORA-00928: missing SELECT statement".
Is there a solution for this? I did not find documentation on the combination of WITH and INSERT.
Thanks in advance.
Hans Received on Thu Apr 30 2009 - 04:11:10 CDT