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



If you are doing this within a program, you could split it up into two SQL
statements, and format the output in an RPG expression between the SELECT
and the INSERT.



Mark


Mark Walter
Sr. Programmer/Analyst
Hanover Wire Cloth a div of CCX, Inc.
mwalter@hanoverwire.com
http://www.hanoverwire.com
717.637.3795 Ext.3040



                    "DeLong, Eric"
                    <EDeLong@Sallybeaut        To:     
"'midrange-l@midrange.com'" <midrange-l@midrange.com>
                    y.com>                     cc:
                    Sent by:                   Subject:     RE: %EDITC function 
in SQL?
                    midrange-l-admin@mi
                    drange.com


                    03/28/02 09:29 AM
                    Please respond to
                    midrange-l






Replace DIGITS() with CHAR().  This gets your minimum requirement, at
least.....

Eric DeLong
Sally Beauty Company
MIS-Sr. Programmer/Analyst
940-898-7863 or ext. 1863



-----Original Message-----
From: rich herdman [mailto:rherdman@columbus.rr.com]
Sent: Thursday, March 28, 2002 8:20 AM
To: midrange-l@midrange.com
Subject: %EDITC function in SQL?


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


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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 thread ...


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.