Hi,Having trouble with this one:[code="sql"] SELECT * FROM [SQLNODEBSTAGE].[PEC_PROD].[DBO].[Staging_Eligibility] WHERE MAX(staging_eligibility_id) <> (SELECT MAX(staging_eligibility_id) FROM [SQLNODEBSTAGE].[STAGING_Archive].[DBO].[Staging_Eligibility_archive])[/code]An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.
↧