Want to check if there are double items in Column Naam in Table zeeboot , and then i show them in a combobox.
Show the result is not the problem but the Statement is .
This is working
Select Naam FROM zeeboot GROUP BY Naam HAVING COUNT(Naam) > 1
But also i want to filter if the Naam is double check if Bijzonderheden IS NULL or empty
Show double Naam where Bijzonderheden is empty
Tried this but the outcome is not good.
SELECT Naam
FROM zeeboot
GROUP BY Naam
HAVING COUNT(Naam) > 1
AND SUM(CASE WHEN Bijzonderheden IS NULL OR Bijzonderheden = ''
THEN 1 ELSE 0 END) > 0
And i think there is another thing , what if there are double Naam and both Bijzonderheden are not empty
Using SQL Server Compact Edition database version 3.5