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.
| Author |
Topic |
|
edb2012
Starting Member
19 Posts |
Posted - 2012-05-10 : 15:39:28
|
| Greetings, I am trying to copy the table fields from one database into another without individually coping all 50 fields, their datatypes and nulls. I tried both of these in query analyzer.#1CREATE TABLE dbo.FDL.MyAcct like dbo.DD1.MyAcctand#2SELECT * INTO dbo.FDL.MyAcct from dbo.DD1.MyAcct where 0=1None of these work. I get invalid object name errors. Can someone tell me what is the correct syntax for my request?I greatly appreciate it ;-)Ed |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-10 : 15:49:54
|
it should beUSE [FDL]SELECT * INTO MyAcct from [DD1].dbo.MyAcct where 0=1 also they should be in same server------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
edb2012
Starting Member
19 Posts |
Posted - 2012-05-10 : 16:07:32
|
| WOW! That certainly did the job. Thank you so much ;-) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-10 : 16:09:05
|
| welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|