Number data type showing up as # in SQL Plus

我与影子孤独终老i 提交于 2019-12-05 06:02:45

# is displayed if the value can't fit in the column; from the SQL*Plus documentation:

If a value cannot fit in the column, SQL*Plus displays pound signs (#) instead of the number.

If it was displaying OK and now isn't, I think you've probably set a column format that is too small for the values you're display, something like column h_rate format 9999999999. If you have a 10-digit number that isn't enough, as it needs a character to display a +/- sign.

You can check if that is the case by clearing all column definitions, with clear columns.

Your H_RATE format may be of smaller digits that of the data:

select to_char(123,'99') from dual; --returns ###

but do proper formatting some thing greater than the data:

select to_char(12345,'99,999') from dual; -- returns 12,345

There are various formatting by oracle given here

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!