Hello Christian: Thank you for your answer---better than the book answer!!
Thanks
Karl
>Gentlemen,
>
>Here's the basic scoop on HAVING.
>
>HAVING evaluates the result set, WHERE evaluates
>the source data.
>
>For example:
>
>SELECT myfield1, myfield2, COUNT(*) AS 'Count' ;
> FROM mytable ;
> WHERE myfield1 = 'AAA' ;
> GROUP BY myfield2 ;
> HAVING Count > 2
> INTO CURSOR TestHaving
>
>This selects all the records where myfield1 =
>'AAA' and groups them together by myfield2. The
>count field is the number of occurrences where
>myfield2 has the same value. The HAVING clause
>then only returns records in the result set where
>the count field was greater than 2.
>
>
>Hope this clarifies things.....
>
>
>
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only