Why do i get #### in the NUMBER column after format… Oracle?

怎甘沉沦 提交于 2019-12-03 17:07:11

问题


I have two problematic columns: Fee NUMBER type, AdjFee also NUMBER. After

column Fee format a5;
select Fee ID smth
from Visit;

i get

Fee    ID   smth
####  123  klkl
####  654  rfjgr

回答1:


You can adjust the number of digits you want SQL*Plus to use to display the numeric data just as you adjust the number of characters used to display character data. Something like

column fee format 999999999.99

will tell SQL*Plus to display up to 9 digits before the decimal point and two after the decimal point. You can adjust that, of course, if you know your fees are going to be smaller (or larger).




回答2:


Yes, column names can be truncated (or) changed to the name you want

From your above select statement.

If you want to truncate 'Fee' column to 'Fe'. Here is the procedure -

col c1 heading "Fe" for a5

col c2 heading "ID" for 999

col c3 heading "smth" for a5

select fee c1, ID c2, smth c3 from visit;



来源:https://stackoverflow.com/questions/17284092/why-do-i-get-in-the-number-column-after-format-oracle

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