× 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.



For the love of Christ will you listen Joel? :-)
Look at the fields in that output file. Do you see one called ODCCEN? Do
you see one called ODUCEN? A value of '0' in there means 1900, a value of
1 means 2000.
If I do the following, I will not have to worry about stuff last affected
before the turn of the century.
If I change your program to this will it get it in a sorted order,
irregardless of what your job date is, irregardless of what century we are
looking at?
ODCCEN concat substr(odcdat,5,2) concat substr(odcdat,1,4) as CreateDate,
ODUCEN concat substr(odudat,5,2) concat substr(odudat,1,4) as UsedDate,

If you just have to have dates you could look at using a case statement
with ODxCEN.

On a related note, I don't think this is valid:
&SqlStmt *bcat 'UsedDate desc'
because I don't think you can order by a derived column unless you do one
of two things,
One, do an order by 4, which means use the fourth column.
Or, two, use a CTE (Common Table Expression) and put your order by after
the CTE like this
with T1 as (
select odlbnm, odobnm, odobtp, ... as createDate, ... as UsedDate, odobtx
from qtemp/dspqry)
select * from T1 order by CreateDate



Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.