Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distinct sql command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01237512
Message ID:
01237559
Vues:
14
Hello Alan

You can do this in VFP8 and before, or use the compatibility mode, you could also accomplish this with a GROUP BY clause and the MIN function.

Bob

>I'm not an SQL expert, so forgive me if I misunderstand how this works, but can you order by a field that is not in the select clause? If not, then wouldn't it kind of mess up the whole purpose of the distinct to also select the PK field?
>
>>You need to apply an ORDER BY clause to get the order you want from SQL, if you have a PK field, this USUALLY represents entry order.
>>
>>Bob
>>
>>>the command
>>>
>>>sele gtype distinct from vwxltbl into cursor vwxltblD
>>>
>>>sorts the field gtype, i wanted it to retain the original order, is that possible?
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform