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
Who is Participating?
Patrick MatthewsConnect With a Mentor Commented:
Just fully qualify your table references, e.g.,SELECT *FROM DB_Name.dbo.Table_Name
protheraAuthor Commented:
Excellent! I thought this would be easy for you experts! Thank-you!
All Courses

From novice to tech pro — start learning today.