> sql_language@p... writes:
>Why can't we do this
>
>Select * from ceclient having Count(cec_clientnumber)>1
>
>The error messages want group by statements for every field.
>
>All I want is to view the complete records which have duplicate values
>and
>make a decision as to which records to delete or keep.
>
I think when you use having, you need to use group by as well. So, it
should be something like this:
Select cec_clientnumber from ceclient group by cec_clientnumber having
Count(cec_clientnumber)>1
And then, if you want to see every field, you can do something like this:
Select * from ceclient where cec_clientnumber in (Select cec_clientnumber
from ceclient group by cec_clientnumber having Count(cec_clientnumber)>1)
hope this would help.
Pong
Thank you. That worked perfectly.
Carolyn