Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with count(*) in sql select
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01224704
Message ID:
01224705
Views:
20
This message has been marked as the solution to the initial question of the thread.
The column MYCNT does not exist, it's created by aggregate function. As such it should be checked in HAVING clause.
...
HAVING MYCNT > 1
...
>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.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform