Metalteck
asked on
Format Number Field
I have a field that is set up as a number 13,4.
I need to format it so that it looks like the following: 9999999V99.
I was trying to use the following formula, but its not working:
to_char(emp.pro_rate_total ),99999999 9)
Any suggestions on how I can get this?
I need to format it so that it looks like the following: 9999999V99.
I was trying to use the following formula, but its not working:
to_char(emp.pro_rate_total
Any suggestions on how I can get this?
Can you post some sample numbers from your number(13,4) field and what you would expect them to look like after you've formatted them?
ASKER
Here are some example:
33009.6
0
91936
40996.8
85009.6
37999.52
27768
86008
56.16
40809.6
50003.2
119995.2
47840
98342.4
94536
60008
54038.4
29993.6
78000
73507.2
33009.6
0
91936
40996.8
85009.6
37999.52
27768
86008
56.16
40809.6
50003.2
119995.2
47840
98342.4
94536
60008
54038.4
29993.6
78000
73507.2
to_char(emp.pro_rate_total ,'fm999999 9d99','NLS _NUMERIC_C HARACTERS = ''V ''')
you didn't specify a grouping character so I made it a space (' ')
you didn't specify a grouping character so I made it a space (' ')
The examples are fine, but how do you each of them to appear after formatting? sdstuber has shown you how to replace the decimal point with the "V" and round to two decimals and that might be all you need.
ASKER
The expected result, regardless of the value is that each value needs to be 9 characters long without any leading 0s.
does that mean you want leading spaces or does that mean you want trailing zeros?
or does that mean something else?
if you supply only 56.16, that's only 5 characters.
What and where do you want the other 4 characters to be?
or does that mean something else?
if you supply only 56.16, that's only 5 characters.
What and where do you want the other 4 characters to be?
ASKER
Yes, I would need leading spaces since it needs to be right justified.
so you want trailing zeroes for values like these? If so, do you want it to always be 2 digits after the decimal? If not, please be specific.
0
85009.6
86008
this really would be a faster process if you supplied both the input and the expected output
0
85009.6
86008
this really would be a faster process if you supplied both the input and the expected output
ASKER
Yes, I would like for 2 digits after the decimal.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.