0

Within MS SQL Server, I am looking to create a new table from an existing table. My existing table is dbo.AmtrakROAS and I would like my new table to be called WeeklyROAS. I suspect the issue is related to a quirk of MS SQL Server and how you generate new tables within it.

Here is my existing code:

Create Table WeeklyROAS

Select * into AmtrakROAS
From WeeklyROAS

Picture of the code and ERROR enter image description here

3
  • Create Table WeeklyROAS is spurious and unnecessary, also you have INTO and FROM table backwards Commented Jun 15, 2022 at 15:21
  • @Charlieface I found the solution but why you would the Create Table WeeklyROAS is unnecessary? How would I have been able to reference a table called WeeklyRoas if I never created one. Commented Jun 15, 2022 at 16:24
  • SELECT ... INTO WeeklyROAS creates the table. Otherwise you need CREATE TABLE WeeklyROAS (Column1... and INSERT WeeklyROAS (Column1... SELECT ... Commented Jun 15, 2022 at 16:26

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.