I am creating a view and I want to create a right justified character field from a numeric field. I am currently using a case structure which is based on the length of the field and concatenates spaces with the trimmed character version of the field. I can do it in one statement with: space(length(char(FILE.FIELD))-length(trim(char(FILE.FIELD)))) concat trim(char(FILE.FIELD)) however older operating systems do not seem to like the space function. It's simple in RPGLE to just use eval CharField = %editc(DecField:'Z') Any ideas how I can do this in SQL?
Code
Code
Comment