gpt4 book ai didi

db2 - SQLCODE:-420,SQLSTATE:22018,SQLERRMC:BIGINT

转载 作者:行者123 更新时间:2023-12-04 01:40:19 29 4
gpt4 key购买 nike

[运行DB2 UDB版本9]为什么此SQL语句起作用

SELECT 
CASE
WHEN A.DAILYDOWNLOADSIZE is null THEN 0
else bigint(A.DAILYDOWNLOADSIZE)
END "DAILYDOWNLOADSIZE",
CASE
WHEN A.DAILYDOWNLOADTIME is null THEN 0
else bigint(A.DAILYDOWNLOADTIME)
END "DAILYDOWNLOADTIME"
FROM
EDMPROD.MQT_STB_FACTS A


...当这个不

SELECT DISTINCT 
bigint(A.CAMID) AS "CAMID",
bigint(A.RID) AS "RID",
A.SOFTWAREVERSION,
A.MODELNUMBER,
A.MANUFACTURERID,
A.MODDATE,
A.POSTTIME,
A.DELIVERYMETHOD,
bigint(A.UPTIME ) AS "UPTIME",
bigint(A.NUMBEROFRESETSSINCELASTSWDL ) AS "NUMBEROFRESETSSINCELASTSWDL",
bigint(A.NUMBEROFSEARCHSIGNALOSDTUNER1 ) AS "NUMBEROFSEARCHSIGNALOSDTUNER1",
bigint(A.NUMBEROFSEARCHSIGNALOSDTUNER2 ) AS "NUMBEROFSEARCHSIGNALOSDTUNER2",
bigint(A.NUMBEROFUSERDISKREFORMATS ) AS "NUMBEROFUSERDISKREFORMATS",
bigint(A.NUMBEROFSYSTEMDISKREFORMATS ) AS "NUMBEROFSYSTEMDISKREFORMATS",
bigint(A.NUMBEROFRECOVEREDDISKERRORS ) AS "NUMBEROFRECOVEREDDISKERRORS",
IPINFO,
CASE
WHEN A.DAILYDOWNLOADSIZE is null THEN 0
else bigint(A.DAILYDOWNLOADSIZE)
END "DAILYDOWNLOADSIZE",
CASE
WHEN A.DAILYDOWNLOADTIME is null THEN 0
else bigint(A.DAILYDOWNLOADTIME)
END "DAILYDOWNLOADTIME",
bigint(A.TOTALNUMBEROFDOWNLOADSSTARTED ) AS "TOTALNUMBEROFDOWNLOADSSTARTED",
bigint(A.TOTALNUMOFCOMPLETEDDLS ) AS "TOTALNUMOFCOMPLETEDDLS",
CURRENT_DATE AS "LOAD_DATE"
FROM
EDMPROD.MQT_STB_FACTS A


我收到错误SQL0420N在
功能“ BIGINT”。 SQLSTATE = 22018。

通过对查询进行故障诊断,我确认了罪魁祸首是两列DAILYDOWNLOADSIZE和DAILYDOWNLOADTIME。两者都必须从character(15)转换为bigint。

第二个SQL语句不起作用是什么?

最佳答案

我对此一无所知,因此在登台表(EDMPROD.MQT_STB_FACTS)中做了一个简单的更改。

我没有将列键入为字符,然后将其强制转换为bigint,而是删除并重新创建了数据类型设置为BIGINT(8)的表。

我从SQL语句中删除了强制转换,错误消失了。

去搞清楚..........

关于db2 - SQLCODE:-420,SQLSTATE:22018,SQLERRMC:BIGINT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6023861/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com