欢迎来到萧静默的博客

书山有路勤为径,学海无涯苦作舟。

SQL查询时,数字合计时报错Numeric overflow for parameter/column (1) source type DECIMAL

SELECT SUM( LFIMG ) AS ZSJXS,
      ZTSD006~MATNR
      FROM ZTSD006
      INNER JOIN ZTSD014 ON ZTSD006~MATNR = ZTSD014~MATNR
      WHERE ZTSD006~MATNR IN @S_MATNR
      AND BUDAT_FH BETWEEN @DATE2 AND @DATE3
      AND ZTSD014~ZSCFL3 IN @S_ZSCFL
      GROUP BY ZTSD006~MATNR
      INTO CORRESPONDING FIELDS OF TABLE @IT_SALE.

合计数字时候如果超出数据类型的位数 报下面错误,需要重新定义数据类型。

短文本
SQL error "SQL code: -10811" occurred while accessing table "ZTSD006".

发生了什么?
Database error text: "SQL message: Numeric overflow for parameter/column (1)
source type DECIMAL, target type DECIMAL, value 'unknown'"

 

posted @ 2022-05-07 10:01  萧静默  阅读(609)  评论(0编辑  收藏  举报