Re: Linking to tables from another SQL database
- From: "Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
- Date: Tue, 23 Jan 2007 13:20:29 -0500
If it's located onto another server and you don't remember the T-SQL syntax,
the File | Get External Data | Link Tables... will create the linked server
and its associated view for you. You might want to play with this option.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Kevin3NF" <kevin@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23%23Nm%238vPHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
Look up "Linked Servers" in SQL Server books online if the two databases
are on different servers.
If on the same server create a view that uses the database name in thefrom
list
Create View myView as
Select *
From SQL_Staff..MyStaffTable join
SQL_A..MyOtherTable on SQL_Staff..MyStaffTable.ID =
SQL_A..MyOtherTable.id
Where whatever....
Use that view in your ADP
--
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
Real-world stuff I run across with SQL Server:
http://kevin3nf.blogspot.com
"Vayse" <vvv> wrote in message
news:ubQ3uMtPHHA.140@xxxxxxxxxxxxxxxxxxxxxxx
Hi
I have an adp, lets say it linked to SQL database called SQL_A.
In another SQL database, SQL_Staff, there is a list of staff.
I need to look up that list in my adp. However, as an adp can only link
to one database, how do I get around this?
Is is possible to create a view in SQL_A that links to the table in
SQL_Staff?
The staff list changes on a daily basis, and SQL_A would need to be able
to see the updated list at any time.
Regards
Vayse
.
- Follow-Ups:
- Re: Linking to tables from another SQL database
- From: Kevin3NF
- Re: Linking to tables from another SQL database
- References:
- Linking to tables from another SQL database
- From: Vayse
- Re: Linking to tables from another SQL database
- From: Kevin3NF
- Linking to tables from another SQL database
- Prev by Date: Re: Data Disappearing When Editing the Field
- Next by Date: Re: Data Disappearing When Editing the Field
- Previous by thread: Re: Linking to tables from another SQL database
- Next by thread: Re: Linking to tables from another SQL database
- Index(es):
Relevant Pages
|