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



Does anyone know of a way to format a number in an SQL statement (similar
to the %EDITC BIF in RPG4)?


Here is what I am trying to do:  I am using SQL to insert records into a file,
and then emailing the contents of that file to various people.  Here
is my SQL statement:

"INSERT INTO QTEMP/MSG
select 'Records in file:  ' || DIGITS(count(*)) from lib/file"


Here's the record it write to my file:

"Records in file:  0000011862"


Is there any way to do some formatting to that number?  I'd like
to remove the leading zeros at a minimum, and inserting commas would
be helpful.  Any suggestions?

Rich Herdman
Abbott Foods
Columbus, OH
email: rherdman@abbottfoods.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.