You're missing the fundamental concept of a tiered architecture. Display formatting is done in a separate layer from the database. Yes, I know in the old days with COBOL and Fortran, we did this sort of formatting for inputs and outputs in the program itself. That ended sometime in the early 1970s.
Please post DDL and follow ANSI/ISO standards when asking for help.