Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 19th, 2006, 07:03 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Link tables from two different SQL Databases

I have two databases in SQL SERVER 2000 namely PMISDB (Personnel) and PENDB (PEnsion Management). I want to create a view that select FileNo, Staffname, ************, Department from Database PMISDB for use in PENDB instead of creating a new staff record. How can I achieve this please?

 
Old October 19th, 2006, 08:23 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

use the four part naming convention
SELECT column1, column2, column3 FROM ServerName.database.dbo.tablename

you can also create a view at the server you are linked to and call that view.


Jaime E. Maccou





Similar Threads
Thread Thread Starter Forum Replies Last Post
using arrays for tables in databases Karla Visual Basic 2005 Basics 1 August 5th, 2008 02:11 PM
Report from two tables in two differents databases cphspain Crystal Reports 1 November 21st, 2006 05:13 PM
How can I merge two databases and tickets tables? drarem Access VBA 2 October 5th, 2004 01:07 PM
Comparing tables from two Databases lguzman Access VBA 1 May 11th, 2004 05:11 PM
Linking tables with multiple databases jlnash Access 1 August 14th, 2003 07:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.