Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Insert into dbo.newtable

Author  Topic 

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2012-06-14 : 09:21:34
There is no visible reason to me why this is failing. I've done this a thousand times before.

I have a table 'trafficwarrantdata'. I need to duplicate that table AND it's data into a new table 'trafficforarrest'. Simple enough?


Insert into dbo.trafficforarrest (col1, col2, col3)
Select
col1,
col2,
col3
FROM Douglasconversion.dbo.trafficwarrantdata



The !@#!!! error keeps reporting "Invalid Object Name dbo.trafficforarrest"

I've done the exact same process countless times before.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-06-14 : 09:23:16
select columns into notExistingTable from sourceTable


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2012-06-14 : 09:29:25
goddamn this syntax checking in SSMS. I've had it mapped out that way and it was so riddled with the damn red squiggly lines that it was causing me to see red and i didn't even bother executing it.
Go to Top of Page
   

- Advertisement -