在SQL Server 2000中按字段按字母顺序排序(Order by Field in non-alphabetical order in SQL Server 2000)
我试图按不按字母顺序排列的名称列表排序项目。 完成清单后,我试图按照字母顺序继续其余部分,而不是最初选择的部分。
看例子:
INPUT:
print 'Results:' select * from Geniuses order by ('Charles Babbage', 'Albert Einstein', 'Adrien-Marie Legendre', 'Niels Henrik Abel')
然后按字母顺序排序
OUTPUT:
Results: Charles Babbage ... details Albert Einstein ... Adrien-Marie Legendre ... Niels Henrik Abel ... Arthur Cayley ... ...
I'm trying to order items by a list of names that are not in alphabetical order. After completing the list I am trying to continue the rest in alphabetical order without the ones I initially selected.
See example:
INPUT:
print 'Results:' select * from Geniuses order by ('Charles Babbage', 'Albert Einstein', 'Adrien-Marie Legendre', 'Niels Henrik Abel')
then finally sort the rest in alphabetical order...
OUTPUT:
Results: Charles Babbage ... details Albert Einstein ... Adrien-Marie Legendre ... Niels Henrik Abel ... Arthur Cayley ... ...
原文:https://stackoverflow.com/questions/9132709
更新时间:2023-06-04 07:06
最满意答案
Your application is stuck. The solution to that is to set a read timeout, as discussed in this question. If the timeout occurs a SocketTimeoutException will be thrown.
相关问答
更多-
如何克隆InputStream?(How to clone an InputStream?)[2023-09-19]
如果所有您想要做的都是多次读取相同的信息,并且输入数据足够小以适应内存,则可以将数据从InputStream复制到ByteArrayOutputStream 。 然后,您可以获取相关的字节数组,并根据需要打开多个“克隆” ByteArrayInputStream 。 ByteArrayOutputStream baos = new ByteArrayOutputStream(); // Fake code simulating the copy // You can generally do better ... -
它们代表有些不同的东西。 InputStream是所有可能的字节流的祖先类,它本身不是有用的,但所有的子类(如使用的FileInputStream )都是处理二进制数据的好方法。 在对应的对象中, InputStreamReader (及其父类Reader )专门用于处理字符(如字符串),因此可以优雅地处理字符集编码(utf8,iso-8859-1等)。 简单的答案是:如果你需要二进制数据,你可以使用InputStream (也可以像DataInputStream ),如果你需要使用InputStreamR ...
-
如何将多个不同的InputStream链接到一个InputStream中(How to chain multiple different InputStreams into one InputStream)[2024-02-06]
就在JDK里! 引用SequenceInputStream JavaDoc : SequenceInputStream表示其他输入流的逻辑级联。 它从一个有序的输入流集合开始,从第一个到第一个文件的读取到达文件结束,然后从第二个文件读取,依此类推,直到最后一个输入流到达文件的末尾。 你想连接任意数量的InputStream而SequenceInputStream只接受两个。 但是由于SequenceInputStream也是一个InputStream您可以递归应用它(嵌套): new SequenceInp ... -
我建议不。 从互联网收到的信息以包裹形式出现,包裹的顺序和速度会有所不同。 BufferedInputStream会自动管理它们,而InputStream可能会导致问题。 感谢您在论坛中发帖! I suggest no. The info received from the internet comes in packages and the sequence and speed of the packages coming will vary. BufferedInputStream automatica ...
-
来自URL的InputStream(InputStream from a URL)[2023-12-18]
使用适合的URL(包括协议!)的java.net.URL#openStream() )。 例如 InputStream input = new URL("http://www.somewebsite.com/a.txt").openStream(); // ... 也可以看看: 使用java.net.URLConnection来触发和处理HTTP请求 Use java.net.URL#openStream() with a proper URL (including the protocol!). E.g ... -
如Roland所述, BufferedInputStream和DataInputStream.readFully()取代了所有的循环代码。 BufferedInputStream, as noted by Roland, and DataInputStream.readFully(), which replaces all the looping code.
-
您的应用程序卡住了。 解决这个问题的方法是设置一个读取超时,正如这个问题所讨论的那样。 如果发生超时,则会抛出SocketTimeoutException。 Your application is stuck. The solution to that is to set a read timeout, as discussed in this question. If the timeout occurs a SocketTimeoutException will be thrown.
-
克隆InputStream(Clone InputStream)[2024-01-18]
正如Boris Spider已经评论过的那样,可以将整个流读取到字节数组流,然后在该资源上打开新流: byte[] byteArray = IOUtils.toByteArray(stream); InputStream input1 = new ByteArrayInputStream(byteArray); InputStream input2 = new ByteArrayInputStream(byteArray); Object body; tr ... -
正如错误所示,您正在主线程上进行网络调用。 在android中,你应该在后台线程中进行任何此类调用。 提示:scheck asyncTasks As the error suggests, you are doing networking calls on the main thread. In android, you should do any such calls in a background thread. Hint: scheck asyncTasks
-
除非您从头到尾读取它并计算您自己读取的字节数,否则无法获得InputStream的长度。 您可以获得S3Object的长度: public static InputStream getResourceAsStream(String fileKey) { AmazonS3 s3Client = new AmazonS3Client(new ProfileCredentialsProvider()); S3Object obj = s3Client.getObject(new GetObject ...