DB2 SQL convert decimal to character pad with zeros -


How do I change DB2 DCIML (11) for the character value from 12345678

My LeftPad function without LeftPad function

  Duplication ('0', 4-length (MY_COLUMN_VALUE)) || CHAR (MY_COLUMN_VALUE) NEW_COLUMN MY_COLUMN_VALUE NEW_COLUMN 1 0004 23 0023   

test ...

  SELECT '32' MY_VALUE, REPEAT ('0', 4- Length ('23 ')) || SYSibm.sysdummy1     from LEFTPAB_MY_VALUE as CHAR ('23')

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -