How do I formulate this query
update forge..dimInteg2
set duplicates =
(select count(*) from (select idCover
from x90..dimCover
group by idCover
having count(*) > 1))
where dimTable = 'dimCover'
to avoid this error
Line 6: Incorrect syntax near ')'.
Similar to [SQL Server subquery syntax
but I can’t seem to get the alias trick to work.
I am on SQL Server 2000
Are you missing a bracket?
Then the alias solution should work.