SQL转换函数给出了不可读的结果

时间:2014-11-13 15:23:44

标签: sql

我有以下SQL代码:

select SUBSTRING(PRJC.NAME,1,35), CONVERT(varchar,CCCBUDGETDATE,101) as Date, 
CONVERT(VARCHAR(19),SUM(INBUDGETAMT)) +' --- '+ CONVERT(VARCHAR(19),SUM(OUTBUGDETAMT)) AS INOUT
from PRJC, CCCPRJCBUDGET 
where PRJC.PRJC=CCCPRJCBUDGET.PRJC and FISCPRD=:X.SYS.FISCPRD and PERIOD=:X.SYS.PERIOD group by PRJC.NAME, CCCBUDGETDATE 

输出是奇怪的数字如下:2.90005e + 006 --- 1.17205e + 006

为什么我的输出数字不清楚,我得到了奇怪的字符' e + 006' ?

1 个答案:

答案 0 :(得分:0)

要删除科学记数法,只需替换
CONVERT(VARCHAR(19),SUM(OUTBUGDETAMT))

SUM(OUTBUGDETAMT)