>>Try this:
>>
>>SELECT GCBW, BHQK, BCHT, ADD_CLJE, BCHTQK, LEFT(STATION,4) ;
>> FROM KYGCGL GROUP BY 6 ORDER BY 6 ;
>> WHERE 'U'$UPPER(GCBH)
>>>
>>
>>>
>>>SELECT KYGCGL.GCBW ,KYGCGL.BHQK ,KYGCGL.BCHT ,KYGCGL.ADD_CLJE ,KYGCGL.BCHTQK ,;
>>> SUBSTR(KYGCGL.STATION,1,4) FROM KYGCGL GROUP BY (SUBSTR(KYGCGL.STATION,1,4));
>>> ORDER BY (SUBSTR(KYGCGL.STATION,1,4)) WHERE AT(UPPER('U']),UPPER(GCBH))>0
>>>
>
>is two sql equal?My sql is group by the first four character in station ,but by 6 is the whole field.
Lu
6 means the field in the result, not in the table, so it is only first four chars
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]