Showing posts with label educationdata. Show all posts
Showing posts with label educationdata. Show all posts

Tuesday, 20 March 2012

Connect to another db on the same server

Hi. How does one programmatically do a SELECT on another database on the
same server? I've got a stored proc in "EducationData" database that needs
to call a SELECT on table "tblStudents" on the "Directory" database. This is
on SQL Server 2000.
Also, I've installed the Books Online from here:
http://www.microsoft.com/downloads/...ng=en#filelist,
but it's asking to do a repair on the current installation and still not
showing up on my start menu. Am I looking in the right place?
Thanks for your help.dw wrote:
> Hi. How does one programmatically do a SELECT on another database on the
> same server? I've got a stored proc in "EducationData" database that needs
> to call a SELECT on table "tblStudents" on the "Directory" database. This
is
> on SQL Server 2000.
> Also, I've installed the Books Online from here:
> http://www.microsoft.com/downloads/...ng=en#filelist,
> but it's asking to do a repair on the current installation and still not
> showing up on my start menu. Am I looking in the right place?
> Thanks for your help.
Try to do "Select * from directory..tblstudents"|||Use master -- You don't have to do this, I'm just showing you that you're
not in the pubs or Northwind database
GO
Select * from SERVERNAME.pubs.dbo.titles
select * from SERVERNAME.Northwind.dbo.Products
"dw" <cougarmana_NOSPAM_@.uncw.edu> wrote in message
news:%23jhZrotmGHA.5076@.TK2MSFTNGP02.phx.gbl...
> Hi. How does one programmatically do a SELECT on another database on the
> same server? I've got a stored proc in "EducationData" database that needs
> to call a SELECT on table "tblStudents" on the "Directory" database. This
is
> on SQL Server 2000.
> Also, I've installed the Books Online from here:
>
http://www.microsoft.com/downloads/...ng=en#filelist,
> but it's asking to do a repair on the current installation and still not
> showing up on my start menu. Am I looking in the right place?
> Thanks for your help.
>|||Thanks, sloan and Maninder :)
"Maninder" <msdhanjal@.gmail.com> wrote in message
news:1151517486.289024.101700@.j72g2000cwa.googlegroups.com...
> dw wrote:
> Try to do "Select * from directory..tblstudents"
>