Zaurb
asked on
Running T-SQL Query across two differentSQL Servers
Hi!
I'm creating a view and query that uses several tables in one SQL Server but needs
also to query another database on another SQL Server to produce correct result.
In MS Access query works like this.
SELECT ProdottiRicambi.*, Ricambi.Codice AS Expr1, Ricambi.Ricambio_I AS
Expr2, Prezzi_Mondial.[Ending Date], Prezzi_Mondial.[Sales Code]
FROM Ricambi, Prezzi_Mondial, Prodotti, ProdottiRicambi
WHERE (((Prezzi_Mondial.[Ending Date])=#12/31/2008#) AND
((Prezzi_Mondial.[Sales Code])="") AND ((ProdottiRicambi.IDProdot to)=24))
ORDER BY ProdottiRicambi.Posizione;
Here, Prezzi_Mondial.[Ending Date], Prezzi_Mondial.[Sales Code] is a linked
table to SQL Server database. How could I link this table or modify this
query to work from within the SQL Server?
Thank you in advance!
I'm creating a view and query that uses several tables in one SQL Server but needs
also to query another database on another SQL Server to produce correct result.
In MS Access query works like this.
SELECT ProdottiRicambi.*, Ricambi.Codice AS Expr1, Ricambi.Ricambio_I AS
Expr2, Prezzi_Mondial.[Ending Date], Prezzi_Mondial.[Sales Code]
FROM Ricambi, Prezzi_Mondial, Prodotti, ProdottiRicambi
WHERE (((Prezzi_Mondial.[Ending Date])=#12/31/2008#) AND
((Prezzi_Mondial.[Sales Code])="") AND ((ProdottiRicambi.IDProdot
ORDER BY ProdottiRicambi.Posizione;
Here, Prezzi_Mondial.[Ending Date], Prezzi_Mondial.[Sales Code] is a linked
table to SQL Server database. How could I link this table or modify this
query to work from within the SQL Server?
Thank you in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.