Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Help Needed Please!
Message
 
 
À
24/08/2001 12:48:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00548100
Message ID:
00548798
Vues:
15
>>>Sorry. It gives me the error: "Cannot GROUP by aggregate field"
>>>
>>>I appreciate the effort though. :)
>>
>>Kevin,
>>
>>Did I ask you to quote message? :) My colleague tested it and it worked fine. Ok, here is her test, you need to use your field names:
>>
>>1.
>>select  min(divnumb) as f ,div.compnumb, ;
>>compname from div ;
>>join comp on div.compnumb=comp.compnumb ;
>>group by div.compnumb into dbf min
>>2.
>>select iif(min.f=divnumb,min.compname,space(30)) as compnumer, ;
>>divnumb, divname ;
>>from div left join min ;
>>on (min.f=div.divnumb and min.compnumb=div.compnumb)
>>
>>I then realized, that there is no need to make join in the first select, so it might be simplified.
>>
>>So, please, show me the code, you're replying to, I let you know, where is a mistake.
>>
>>BTW, I don't see your appreciation :)
>
>Nadya,
>It was a slight typo in group by 1.
>'Best' is attractive there :) I suspect a nonSQL approach might be longer in code but faster.
>Cetin

Thanks, Cetin. You understood, that this was a typo. Too bad, that Kevin didn't understand that.

Anyway, thanks and now I finally have to work on my project :)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform