Solved

Access tables in different DB on same server

Posted on 2010-11-11
2
267 Views
Last Modified: 2013-11-05
On the same MS SQL 2005 server, I want to access tables in a different DB. The DB my code is in, for example, is Prothera. The other DB is MOM. So my stored procs and table value functions that I'm using are in Prothera. So I'm accessing tables in Prothera and in MOM.  thx
0
Comment
Question by:prothera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 250 total points
ID: 34114344
Just fully qualify your table references, e.g.,SELECT *FROM DB_Name.dbo.Table_Name
0
 

Author Comment

by:prothera
ID: 34114380
Excellent! I thought this would be easy for you experts! Thank-you!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question