select to_char('10','10')
from dual
This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL
why? pls help
Answer Posted / neha k
to_char function can take both Number and String Values but
one at a time.
ie. select to_char(10) from dual;
select to_char('10') from dual;
both are valid.
Another form of overloaded function to_char accepts two
arguments first is Date and second if its format in which
it needs to be converted as string.
ie. select to_char(sysdate,'YYYYMMDD') from dual;
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How to open a cursor variable?
What is a select query statement in oracle?
How to run queries on external tables?
what are the advantages of running a database in archive log mode?
What is using clause and give example?
What is a system tablespace?
What are the predefined tablespaces in a database?
Is java required for oracle client?
How to connect ms access to oracle servers?
What is the difference between primary key and unique key and foreign key in oracle?
What is the use of aggregate functions in oracle?
How to delete a column in an existing table in oracle?
Can we convert a date to char in oracle and if so, what would be the syntax?
What is a trigger and what are its types?
How to work with data objects interactively?