Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This SQL sentence doesn't work ,help me
Message
From
10/04/2002 04:44:45
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
10/04/2002 04:27:09
Lu Ping
Zhuhai Tec Co.
Zhuhai, China
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00643027
Message ID:
00643048
Views:
15
>>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.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform