|
-----Original Message----- From: Hatzenbeler, Tim <thatzenbeler@clinitech.net> To: 'midrange-l@midrange.com' <midrange-l@midrange.com> Date: Thursday, October 18, 2001 5:44 PM Subject: Sql Order by Question >Is there a way in a sql statement, to check the field to test if it's >numeric, and if its, a valid number, (cast) it as an integer, and sort it >that way? > no. There aren't any class tests in SQL. What you have is a character field, SQL depends on the field type to tell it how to behave. But, you can write your own. Look at User Defined Functions. At the latest release, you can even do that with Java, which might actually make this a simpler function. =========================================================== R. Bruce Hoffman, Jr. -- IBM Certified Specialist - AS/400 Administrator -- IBM Certified Specialist - RPG IV Developer "America is the land that fought for freedom and then began passing laws to get rid of it." - Alfred E. Neuman
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.