Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Access tables in different DB on same server

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
prothera
Asked:
prothera
1 Solution
 
Patrick MatthewsCommented:
Just fully qualify your table references, e.g.,SELECT *FROM DB_Name.dbo.Table_Name
0
 
protheraAuthor Commented:
Excellent! I thought this would be easy for you experts! Thank-you!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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