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



Thanks to both Eric and Roger for your help. Both solutions work. Once
again this list provides quick answers. Thanks again.

Dean Eshleman,
MMA, Inc.

On Thu, 9 Sep 2010 10:42:06 -0500, in midrange.midrange-l you wrote:

Use the DIGITS() function.

Select DIGITS(DECIMAL(mycount,8,0))
From ...

Hth,
-Eric DeLong

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Dean.Eshleman@xxxxxxxxxxxxxx
Sent: Thursday, September 09, 2010 10:30 AM
To: midrange-l@xxxxxxxxxxxx
Subject: SQL convert count to char

Hi,

We have a requirement to update a character field with the count of the
records in the file. The count needs to be right justified in the
character field and contain leading zeros. The length of the character
field is 8. I know how to get the count with an SQL statement, but how
can I convert that count to character with leading zeroes? Is this even

possible in SQL? We are on V5R4.

Dean Eshleman
MMA, Inc.

______________________________________________________________________
Confidentiality Notice: This information is intended only for the
individual or entity named. If you are not the intended recipient, do
not use or disclose this information. If you received this e-mail in
error, please delete or otherwise destroy it and contact us at (800)
348-7468 so we can take steps to avoid such transmissions errors in the
future. Thank you.

______________________________________________________________________
Confidentiality Notice: This information is intended only for the individual or entity named. If you are not the intended recipient, do not use or disclose this information. If you received this e-mail in error, please delete or otherwise destroy it and contact us at (800) 348-7468 so we can take steps to avoid such transmissions errors in the future. Thank you.

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.