Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select SQL and ORDER BY...defective?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00337312
Message ID:
00337316
Vues:
15
>I got a weird problem here. Maybe I am missing the logic somewhere.
>
>Let say we have a very simple two fields dBF Table; DATE and CLT_CODE
>
>SELECT * FROM invoice ORDER BY CLT_CODE,DATE && works perfect
>
>SELECT * FROM invoice ORDER BY DATE,CLT_CODE && problem
>gives the same result as ORDER BY DATE
>
>I also tried a separate index and DTOS(DATE)+CLT_CODE
>
>I am expecting a sequence of dates for the same client, then another strip of dates for the next client and so on. Instead, it just order by dates ignoring the client's Code (CLT_CODE), so the clients are not regrouped together.
>
>Did I leave the office too many times early in the morning so that I am missing an obvious logic here or is this a bug in Foxpro 2.5b and 2.6a ??
>
>Thanks in advance.

Did you try:

SELECT * FROM invoice ORDER BY dtos(DATE), CLT_CODE

If that does not work, try giving your column another name besides DATE:

Select * from invoice order by dtos(date_client), clt_code

Of course, you would need to change the column name from date to date_client.
Carl R. Perkins
NJ5J Software Corp. http://www.nj5j.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform