Hello,
I am using SQL Server 2005 and have the following select statement inside a stored procedure. The stored procedure has a bunch of other selects that select from tables in the test1 database and the sp is being run against test1 database. The table in the select statement below is in database test2. How can I reference this table from database test1? Do I just put the database name plus a dot in front of the table? I tried that but it doesn't work.
select max(person_id) from person
Thanks in advance,
Kathy
I am using SQL Server 2005 and have the following select statement inside a stored procedure. The stored procedure has a bunch of other selects that select from tables in the test1 database and the sp is being run against test1 database. The table in the select statement below is in database test2. How can I reference this table from database test1? Do I just put the database name plus a dot in front of the table? I tried that but it doesn't work.
select max(person_id) from person
Thanks in advance,
Kathy