I need to query two tables in two different databases on the same SQL Server. On one table, I need to get all the rows (simple select) and on the other, a select but where the id matches a parameter in my stored proc.
I tried doing this but get the error
The multi-part identifier could not be bound.
How can I go about this?
QUERY:
SELECT QUALITY_CENTER, POSTCODE_ID, (SELECT [QCID]
FROM [Website_Interactive].[dbo].[IIPCentre_UserObject]
WHere LoginID = @loginID)
FROM IIP_QC_LIST