June 27, 2012 at 1:55 pm
Hi,
I had a piece of syntax that was able to query between multiple objects within the 'Object Explorer' window which allowed me to do joins across servers without needing to use the 'linked server' function.
I believe the syntax was something like ‘JOIN server2..dbo.tblname’ (I believe it had double ‘..’ before the .dbo).
I cannot remember where I got this syntax from, but I think it was likely from one of the Itzik Ben-Gan books but I cannot find any reference.
If anyone is able to help with this syntax or provide an alternative to using linked servers I would be most grateful
Thanks,
June 27, 2012 at 2:01 pm
Are you sure it was servers and not just databases?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 27, 2012 at 2:15 pm
could it be based on an openrowset command??
--database name required
SELECT *
FROM OPENROWSET( 'SQLNCLI',
'Server=DEV223\SQL2012;Trusted_Connection=yes;',
'SET FMTONLY OFF; SET NOCOUNT ON; SELECT * FROM HDSDEV1200.sys.TABLES'
)
since the above returns a table, i could wrap it an alias and join it agaisnt something else
Lowell
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply