Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
garytrammell
Starting Member
1 Post |
Posted - 2004-10-19 : 20:13:12
|
| I have tried to find the answer for my delima with no success. Maybe someone can help. 1st, I am not an SQL expert by anymeans. Here is my problemI have 2 databases located on the same SQL 7.0 server(windows 2000). Each database is used for a program that runs our business. There are 2 programs and two database's. Each of the databases has a "Customers" table. I need some way to link the "customer" tables from each database together so when either program needs a customers info it will be the same. The customer tables in each DB are the same format. The "Customer ID Number" is an identity key that is auto created when a new customer is added.I would appreciate any help I could receive. Also I am willing to PAY for help. Thanks Gary TrammellPro Rodeo Announcer |
|
|
brandonl
Yak Posting Veteran
58 Posts |
Posted - 2004-10-19 : 20:34:17
|
| You could do a UNION to make the two tables appear as one. To select records from different databases, you can do the following: SELECT Databasename.dbo.FieldName FROM Databasename.dbo.CustomersJust change the Database name to the name of the database. That also assumes the owner is dbo.Also, make sure the account you are using for the queries has rights to both databases.~BrandonL |
 |
|
|
|
|
|