I am trying to format a column of type integer using the format() function.
The SQL is somewhat like:
select phone_no(format '999-999-9999') from cust_returns
I am running this from the SQL assistant and it doesn't work. The data is displayed in its original form with "," seperators and format() has no effect.
Am I missing anything?
Appreciate your help.
FORMAT is only applied when there's a CAST from/to a string.
Only for BTEQ REPORTs it's done automatically, for anything else you need to add a CAST to a [VAR]CHAR, most datatypes also work with a simple TRIM:
phone_no(format '999-999-9999') (char(12))