>Can someone please explain why the following sql select gives error "column MYCNT not found"?
>
>
>select MYFLD, COUNT(*) as MYCNT from MYTABLE where MYCNT > 1 group by MYFLD
>
>
>Thank you.
You can not use calculated field in WHERE expression, only in HAVING.
select MYFLD, COUNT(*) as MYCNT from MYTABLE group by 1 having myCnt > 1
If it's not broken, fix it until it is.
My Blog