<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2719.2200" name=GENERATOR>
<STYLE>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle17
{font-family:Tahoma;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=648105717-15052003><FONT color=#0000ff
size=2>Mark,</FONT></SPAN></DIV>
<DIV><SPAN class=648105717-15052003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=648105717-15052003><FONT color=#0000ff size=2>It T-SQL you
reference a table in another db using the IN clause in which you give the path
name to the db containing the table. You should be able to find info about
this in BOL.</FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><B><FONT color=#0000ff>Charles Wortz</FONT></B></SPAN>
<BR><SPAN lang=en-us><FONT color=#0000ff>Software Development
Division</FONT></SPAN> <BR><SPAN lang=en-us><FONT color=#0000ff>Texas Education
Agency</FONT></SPAN> <BR><SPAN lang=en-us><FONT color=#0000ff>1701 N. Congress
Ave</FONT></SPAN> <BR><SPAN lang=en-us><FONT color=#0000ff>Austin, TX
78701-1494</FONT></SPAN> <BR><SPAN lang=en-us><FONT
color=#0000ff>512-463-9493</FONT></SPAN> <BR><SPAN lang=en-us><FONT
color=#0000ff>CWortz@tea.state.tx.us</FONT></SPAN> </P>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Mark Boyd
[mailto:MarkBoyd@McBeeAssociates.com] <BR><B>Sent:</B> Thursday 2003 May 15
12:46<BR><B>To:</B> SQLServerList<BR><B>Subject:</B> [dba-SQLServer]Call another
db from sproc<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Is there a way to reference
DatabaseA from within a sproc on DatabaseB?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">We have a need to select data from
a table in a different database.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Thanks,</SPAN></FONT></P>
<P class=MsoAutoSig><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Mark Boyd</SPAN></FONT></P>
<P class=MsoAutoSig><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Sr. Systems
Analyst</SPAN></FONT></P>
<P class=MsoAutoSig><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">McBee Associates,
Inc.</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV></BODY></HTML>