我有一个只有一个表的Access数据库。该表由2个字段组成。
IG_Number
和TimeOfArrival
。
IG_Number: 0,1,2,3,4
例如,我的字段的值为TimeOfArrial: 12,15,19,5,19
和TimeOfArrival
。我有一个代码,这个SQL命令用于按升序排序SELECT * from myTable ORDER BY (TimeOfArrival);
字段:
---------------------------
IG-NUMBER | TIMEOFARRIVAL |
---------------------------
3 5
0 12
4 19
1 19
---------------------------
这给了我两张表的结果
TimeOfArrival
但我的问题是,如果19
表中有重复项,例如TimeOfArrival
。如何根据IG-Number
的重复次序的升序排列-------------------------
4 19
1 19
-------------------------
的升序?
这样,而不是
----------------------
1 19
4 19
---------------------
我会
import com.sun.deploy.net.HttpResponse;
public class Test {
public static void main(String args[]) {
CloseableHttpClient httpclient = null;
CredentialsProvider credsProvider = new BasicCredentialsProvider();
credsProvider.setCredentials(new AuthScope("[target-url-domain]"), AuthScope.ANY_PORT),
new UsernamePasswordCredentials("usrename", "password"));
credsProvider.setCredentials(new AuthScope("[proxy-domain]"), AuthScope.ANY_PORT),
new UsernamePasswordCredentials("usrename", "password"));
SSLcontextBuilder builder = new SSLCOntextBuilder();
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build);
httpclient = HttpClients.custom().setSSLSocketFactory(sslsf)
.setDefaultCredentialsProvider(credsProvider).build();
String url = "targetUrl";
HttpGet httpGet = new HttpGet(url);
RequestConfig config = RequestConfig.custom().setProxy(new HttpHost("[proxyUrl]", 89)).build();
httpGet.setConfig(config);
HttpResponse resp = httpclient.execute(httpGet);
}
答案 0 :(得分:2)
将IG-NUMBER
添加到order by
Order by TimeOfArrival asc,IG-NUMBER asc
第一个结果将由TimeOfArrival
订购,然后在IG-NUMBER