db2 SQL 0420 N在函数“DECFLOAT”的字符串参数中发现无效字符

tsm1rwdh  于 12个月前  发布在  DB2
关注(0)|答案(1)|浏览(235)

我得到了错误
SQL 0420 N在函数“DECFLOAT”的字符串参数中发现无效字符
当执行此查询时。我很困惑,因为我再也检测不到任何错误或问题。您能帮助我吗?我的数据库是运行在Linux 10.5版上的IBM DB/2。

SELECT 
    RTRIM(b.TOPOB) AS TOPOB, 
    a.TESTID, 
    a.AFO AS AFO, 
    DATE(a.ERFTS) AS DATUM, 
    a.WAFERNUM, 
    CHAR(b.rownum * 100) || CHAR(b.colnum) AS COLNUM,
    CAST(b.devlres AS DECIMAL(10, 2)) AS ELEM_COS_RDIFF,
    CAST(d.gmrcoef AS DECIMAL(10, 2)) AS ELEM_HC,
    CAST(d.amrcoef AS DECIMAL(10, 2)) AS ELEM_LINEARITY_ERROR,
    CAST(b.devdres AS DECIMAL(10, 2)) AS ELEM_RCOS,
    CAST(b.devhres AS DECIMAL(10, 2)) AS ELEM_RGES,
    CAST(b.devestarres AS DECIMAL(10, 2)) AS ELEM_RSIN,
    CAST(d.pinangle AS DECIMAL(10, 2)) AS ELEM_SENS_NMAX,
    CAST(d.senres AS DECIMAL(10, 2)) AS ELEM_SENS_NMIN,
    CAST(b.devkres AS DECIMAL(10, 2)) AS ELEM_SIN_RDIFF 
FROM 
    bouser.mrchm_hdr AS a
INNER JOIN 
    bouser.mrchm_data AS b ON b.testid = a.testid
INNER JOIN 
    bouser.mrchc_data AS d ON d.testid = a.testid 
                          AND b.topob = d.topob 
                          AND b.rownum = d.rownum 
                          AND b.colnum = d.colnum
INNER JOIN (
    SELECT 
        SERIENNR, 
        AKTMESSUNG 
    FROM 
        BOUSER.AFO0100 
    WHERE 
        Produkt LIKE 'Tethys%'
) T ON T.SERIENNR = a.WAFERNUM  
WHERE 
    T.AKTMESSUNG = 'Y' 
    AND DATE(a.ERFTS) > CURRENT DATE - 2247 DAYS 
    AND a.afo = 9053 
    AND a.lastview = 'Y'
ORDER BY 
    a.WAFERNUM, COLNUM;

字符串

sqyvllje

sqyvllje1#

事实证明,查询基本上是正确的。由于T.SERIENNR是CHAR,而a.WAFERNUM是BIGINT,因此无法进行直接赋值。更正将是:

ON T.SERIENNR = CHAR(a.WAFERNUM)

字符串

相关问题