We are converting from Sybase to SQL Server and we have several instances in our code that use Having without a group by and we are getting errors at runtime when we run the code.
Example
SELECT Col1, Col2
FROM table_name
WHERE ProcessedSw = 'N'
HAVING Col1 = Min(Col1)
Any help would be appreciated.
Thanks