select to_char('10','10')
from dual
This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL
why? pls help
Answer Posted / mohammad islam
The format is to_char('10','0,999.99')
or to_char(10,'0,999.99')
What is the meaning of it? It means 10 has to be 4 digit
long number with comma after the first digit and 2 digit
decimal places
like 0,010.00
But for to_char('10','0999.99'), the result would be
0010.00 because 4 digit before the decimal place with no
comma and 2 digit after the decimal place
And for TO_CHAR(1230,'00,999.99'), the result is
01,230.00(as you see 5 digit before decimal and 2 digit
after decimal and comma after 2 digit.
I hope it will clear everything
Thanks,
Mohammad Islam
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
What is oracle datasource?
How to empty your oracle recycle bin?
How to create lov dynamically at runtime & attach to text field?
How do you get nicely formatted results from an oracle procedure that returns a reference cursor?
How to rollback the current transaction in oracle?
Explain an exception and its types?
What is Undo Management Advisor in Oracle?
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
How to use "for" statements in oracle?
Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).
Explain mutating triggers.
What happens if recursive calls get out of control?
How to define a data field as not null?
What happens if the imported table already exists?
What is the sql query to concatenate column values from multiple rows in oracle?