Hi,
I'm trying to join some data with a correlated subquery from a linked server table.
I have...
But it won't run with
Any ideas?
Thanks,
1DMF.
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Dance Music Downloads
I'm trying to join some data with a correlated subquery from a linked server table.
I have...
Code:
SELECT CompanyName,FirstName,LastName,[Membership Number]
FROM dbo.Contacts c
LEFT OUTER JOIN (
SELECT TOP 1 Adv_MemNo,Sub_Date
FROM [Members].[Members_Live].[dbo].Business_Register b
WHERE b.Adv_MemNo = c.[Membership Number]
ORDER BY Sub_Date ASC
) AS FirstNBCS
ON c.[Membership Number] = FirstNBCS.Adv_MemNo
But it won't run with
The multi-part identifier "c.Membership Number" could not be bound.
Any ideas?
Thanks,
1DMF.
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Dance Music Downloads