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



Indeed, David

If there's a question, a quick try is always the way I go - run the DIGITS function in a SELECT statement by itself in interactive SQL over a single-record table - sysibm/sysdummy1 is always on the system, a single variable-length 1-byte character field, value = 'Y' on one of our machines right now. Another one is QSYS2/QSQPTABL which has a single 4-byte integer field, value = 1

select digits(5) from sysibm/sysdummy1

results in this - the leading zeroes are there.

DIGITS ( 5 )
0000000005

If you want to see what it looks like for a 3-digit number, try

select digits(decimal(5,3,0)) from sysibm/sysdummy1

DIGITS
005

Interactive SQL - or the SQL part of Navigator, are my favorite test bed.

HTH
Vern
-------------- Original message ----------------------
From: David FOXWELL <David.FOXWELL@xxxxxxxxx>
Du liebe est ist so toll als Du da bist!

I wasn't expecting '0' concat Digits(MyCol) to fill all the left zeros!


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.