I want to create an "alias" for tables on a linked server but have not been able to determine the proper syntax.
I thought that something such as what's below would work through Query Analyzer (while logged into server 1 with [VirtualServer\Instance] as a linked server), but the syntax below does not work.
DECLARE @ABC CHAR(70)
DECLARE @XYZ CHAR(70)
SET @ABC = '[VirtualServer\Instance].database.owner.BigLongTableName1'
SET @XYZ = '[VirtualServer\Instance].database.owner.BigLongTableName2'
SELECT @ABC.element1, @XYZ.element2
FROM @ABC LEFT JOIN @XYZ ON @ABC.element1 = @XYZ.element1
Any assistance is appreciated.
snyderj
I thought that something such as what's below would work through Query Analyzer (while logged into server 1 with [VirtualServer\Instance] as a linked server), but the syntax below does not work.
DECLARE @ABC CHAR(70)
DECLARE @XYZ CHAR(70)
SET @ABC = '[VirtualServer\Instance].database.owner.BigLongTableName1'
SET @XYZ = '[VirtualServer\Instance].database.owner.BigLongTableName2'
SELECT @ABC.element1, @XYZ.element2
FROM @ABC LEFT JOIN @XYZ ON @ABC.element1 = @XYZ.element1
Any assistance is appreciated.
snyderj