×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
What you're describing isn't sorting, unless you have some other idea of
what you're up to. There isn't any sort order that I've seen where,
based on the data you've provided, the result set would return a, c, d,
b.
That said, you can set a custom sort sequence for the sql session and
that may achieve your goal. I've never had need of it, but it's
documented in the Information Center. Once you've created your custom
sort sequence you can use it by using set option
sortseq=yourlib/yourtable.
Coy Krill
Systems Analyst
Whidbey Island Bank
-----Original Message-----
From: java400-l-bounces+coyk=wibank.com@xxxxxxxxxxxx
[mailto:java400-l-bounces+coyk=wibank.com@xxxxxxxxxxxx] On Behalf Of
Ashish Kulkarni
Sent: Monday, July 30, 2007 08:12
To: java400-l@xxxxxxxxxxxx
Subject: SQL and Order By Question
Hi
I have a table, which i want to sort by value in Key,
for example the table is as below
Key Desc
a This is A
b This is B
c This is C
d This is d
I want to read the result set as
a
c
d
b
How do i write this SQl statement, if i just do order
by Key i can get it either a,b,c,d or d,c,b,a but not
the way i want
Any ideas
Ashish
A$HI$H
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.