1

I've looked at the other postings but I haven't seen a resolution for this.

CREATE TABLE newtable AS (SELECT * FROM yourtable) with no data ;

Then

with cte as (
select top 10* from yourtable
)
insert into newtable

select * from cte

select * from newtable

I get an error saying it expects a select and not an insert.
How would I accomplish inserting the cte into a table?

Yun
  • 3,056
  • 6
  • 9
  • 28
ctk
  • 11
  • 1

0 Answers0