Vertica - Work around for using WITH with INSERT statement
<p>I have a SQL query like </p>

<pre><code>with subtable as (
................
)
select * 
from subtable
</code></pre>

<p>I wanted to insert the records from the select statement into a table. looking for something like :</p>

<pre><code>with subtable as (......)
insert into newtable 
select * 
from subtable
</code></pre>

<p>However, in Vertica, INSERT cannot be used with the WITH ( CTE) statements. </p>

<p>Is there any work around for this?</p>

<p>Thanks for the help</p>