Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Expression in order by
Message
 
 
À
18/07/2008 17:53:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01332393
Message ID:
01332423
Vues:
6
You're welcome

>Thanks a lot, Sergey!
>
>Tamas
>>You can only put expression in the ORDER BY that resolves to a field # in the SELECT field list. You can add the expression to the SELECT field list and then sort on it.
>>
>>SELECT ...,
>>    VAL(SUBSTR(ALLTRIM(bp_tetel.engedely),9,2)) AS sort1, ;
>>    VAL(SUBSTR(ALLTRIM (bp_tetel.engedely),3,6)) AS sort2 ;
>>  FROM ... ;
>>...
>>  ORDER BY sort1, sort2 ;
>>...
>>
>>>Is it possible to put an expression in an order by clause?
>>>I tried this but it wont work.
>>>ORDER BY VAL(SUBSTR(ALLTRIM(bp_tetel.engedely),9,2)), VAL(SUBSTR(ALLTRIM(bp_tetel.engedely),3,6));
>>>Can it be resolved somehow?
>>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform