• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

In query designer How do I add table from different database

I am creating new view in enterprise manager.
In query designer When I select add table ,It displays  all tables for the current database,
My question is How do I add table from different database same server.

Is it not possible in query designer ?

Thanks
Narendra

0
NarendraNisha
Asked:
NarendraNisha
  • 2
3 Solutions
 
BillAn1Commented:
It's not possible to display them in the tables list, but you can type in the full name of the table in the SQL window (database.owner.object) and so include it in your query. However, since there is no referential integrity checks across databases it will not automatically create the join between it and any of your other tables, you will need to manually specify the join.
0
 
peh803Commented:
SELECT * INTO targetDatabase.dbo.NewTableName
  FROM sourceDatabase.dbo.SourceData

peh803
0
 
EliasSportsBureauCommented:
You can also try creating a view in your current database that points to this table on the other database.  That way you can do a select on your view and will not have to create any reference to another database.

Hope this helps
0
 
peh803Commented:
point split if fine with me..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now