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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DB issue in SQL server management studio
 Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

7 Posts

Posted - 10/03/2012 :  16:49:35  Show Profile
I am trying to extract a part of data into a temp table on a different database on a separate SQL server. Here's the query for that:

SELECT [DB1].[dbo].T1 .Col1, [DB1].[dbo].T2 .Col1, [DB1].[dbo].T1 .Col2, [DB1].[dbo].T2.Col2
INTO [DB2].dbo.DB2
FROM [DB1].[dbo].T1 

It's not recognizing DB2 here. When I run this query under SQL Server Management Studio, it gives an error:

Database 'DB2' does not exist.

If I comment out the line2 in above query, it compiles and works fine.

Any idea on how to fix this problem?

The Chadinator

1974 Posts

Posted - 10/03/2012 :  16:53:04  Show Profile  Visit chadmat's Homepage

Edited by - chadmat on 10/03/2012 16:53:59
Go to Top of Page
  Previous Topic Topic Next Topic  
 Topic Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000