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 - 1646 days ago
Last viewed on: 15 Aug 2018 (2937 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

10002.

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

COMMENTS