Midrange News for the IBM i Community

Posted by: renojim
concat with leading zero's
has no ratings.
Published: 11 Feb 2014
Revised: 11 Feb 2014 - 2074 days ago
Last viewed on: 17 Oct 2019 (3232 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

concat with leading zero's Published by: renojim on 11 Feb 2014 view comments(3)

Anybody know how to return two integers in an sql statement, preserving any leading zeros in the second integer?

So if the fields are 1,0 and 4,0 respectively, and the values are

1  and 0002

I can select concat(firstfield, secondfield) (or '||', if you prefer), and get


Return to midrangenews.com home page.
Sort Ascend | Descend