I'm seeing the same error message for the following code:
CREATE TABLE #CDHToDelete
(
CDH_RecordID UNIQUEIDENTIFIER
)
INSERT #CDHToDelete
SELECT CDH.CDH_RecordID
FROM (IERP72..CommissionDefinitionHeader CDH
INNER JOIN IERP72..CommissionDefinitionDetail CDD
ON...