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--