Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Expression in order by
Message
 
 
To
18/07/2008 17:53:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01332393
Message ID:
01332423
Views:
7
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform