Request SQL

Thierry Nauze huancaya at wanadoo.fr
Thu Mar 25 10:38:02 CST 2004


Le 25 mars 04, à 10:27, Ruslan Zasukhin a écrit :

> On 3/25/04 6:46 AM, "Thierry Nauze" <huancaya at wanadoo.fr> wrote:
>
>> Hello,
>> ..
>
>
> SELECT fa, fb, count(fb) as c
> FROM T
> WHERE c > 1
> GROUP BY fb, fa
>
> Although this is not very effective
>     (GROUP BY on 2 fields, and not needed group by on fa)
>
> But this even not works in Valentina 1.x
>
>
> You can do instead something as
>
> SELECT fa, fb, count(fb)
> FROM T
> GROUP BY fb, fa
> ORDER BY 3 DESC
>
> Now records that have count(fb) will be last in the cursor.
> You can ignore them by your code,

Thank you
I am going to try

> Or you can make loop to DropRecord() them from cursor.

At the moment, I am testing this method

Best regards
--
Thierry Nauze			Saint-Denis de la Réunion


More information about the Valentina mailing list