|
Huh? I fail to see how EBCDIC is any more consistent than ASCII. In ASCII, lowercase comes after uppercase. In EBCIDIC, assuming CCSID 37 then by default lowercase comes before uppercase. CREATE TABLE QTEMP/TESTCW (FLD1 CHAR (10 ) NOT NULL WITH DEFAULT) INSERT INTO QTEMP/TESTCW VALUES('Charles') INSERT INTO QTEMP/TESTCW VALUES('CHARLES') INSERT INTO QTEMP/TESTCW VALUES('APPLE') INSERT INTO QTEMP/TESTCW VALUES('apple') INSERT INTO QTEMP/TESTCW VALUES('charles') select * from testcw order by fld1 apple charles APPLE Charles CHARLES Now if you change the sort sequence to *LANGIDSHR then you get: APPLE apple Charles CHARLES charles HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121
-----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of jmmckee@xxxxxxxxxxxxxx Sent: Friday, September 01, 2006 9:50 AM To: midrange-l@xxxxxxxxxxxx Subject: RE: Converting names & street names Quoting Jeff Crosby <jlcrosby@xxxxxxxxxxxxxxxx>:The only way to get this right is not to lose the mixed-case form in the first place. If it's not feasible just to store the name in mixed-case and upper-case it for comparisonsTo me, the only reason this data is stored in the databasein uppercase isinertia. Years and years ago printers could only print uppercase. For all of you that are smarter than me: Suppose I decide I'm going to just store the data in the database in mixed-case form. What are the ramifications? Will sortsand OPNQRYF andSQL still _sequence_ them in true alphabetical order? Iunderstand thatcomparisons for include/equal/etc need to be altered as"Joe" and "JOE" willnot compare equal. What other kinds of thing are there? As long as Midrange-L has been here and as often as othertopics haverepeated themselves ad nauseum, I'm rather amazed wehaven't hashed this outbefore. 'Course I lose brain cells on a monthly basis . . . -- Jeff Crosby Dilgard Frozen Foods, Inc. P.O. Box 13369 Ft. Wayne, IN 46868-3369 260-422-7531One interesting aspect of AS/400 is that it uses EBCDIC. Sorts are consistent with that character set. I worked on another computer, years ago, that was ASCII. A file of names was sorted and printed on an upper case only printer. Nobody was happy with the results. Nobody knew to look at the data to see that it had been entered as both all upper case as well as mixed case. A small program change worked around that sort issue. John McKee -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.