1. 程式人生 > >IBM DB2 SQLCODE -407

IBM DB2 SQLCODE -407

遇到407 錯誤,說明正在有一個不為NULL的值沒有被賦值。
例如:正要插入或者新增一條記錄, 記錄的某個欄位為NULL,但資料庫不允許這個欄位為NULL,就會丟擲407錯誤。

可以根據COLNO去查詢哪個值出錯。

例如:
NULL value to a NOT NULL column "TBSPACEID=23, TABLEID=3, COLNO=1" is not allowed.. SQLCODE=-407, SQLSTATE=23502, DRIVER


-407
AN UPDATE, INSERT, OR SET VALUE IS NULL, BUT THE OBJECT COLUMN column-name CANNOT CONTAIN NULL VALUES
Explanation
One of the following conditions occurred:
• A null insert or update value was specified for a column defined as NOT NULL.
• A SET transition variable statement specified a NULL value for column defined as NOT NULL without the WITH DEFAULT clause in the table definition.
• The update or insert value was DEFAULT, but the object column was declared as NOT NULL without WITH DEFAULT in the table definition. Consequently:
o A default value of NULL cannot be inserted into that column.
o An update cannot set default values of NULL in that column.
o A SET transition variable statement in a trigger cannot set default values of NULL in that column.
• The column name list for the INSERT statement omits a column declared NOT NULL and without WITH DEFAULT in the table definition.
• The view for the INSERT statement omits a column declared NOT NULL and without WITH DEFAULT in the base table definition.
• A null insert value was specified for a ROWID column.
System action
The statement cannot be processed. The 'column-name' might be returned in the SQLCA, depending on the syntax of the SQL statement in which the error was detected.
Programmer response
Examine the definition of the object table to determine which columns of the table have the NOT NULL attribute or have a type of ROWID, and correct the SQL statement accordingly.
SQLSTATE
23502

相關推薦

IBM DB2 SQLCODE -407

遇到407 錯誤,說明正在有一個不為NULL的值沒有被賦值。例如:正要插入或者新增一條記錄, 記錄的某個欄位為NULL,但資料庫不允許這個欄位為NULL,就會丟擲407錯誤。可以根據COLNO去查詢哪個值出錯。例如:NULL value to a NOT NULL colum

DB2-SQLCODE 錯誤碼大全---[IBM官方]

SQL error codes ### SQLCODE Description ### -007 statement contains the

IBM DB2 控制中心等圖形工具在 Windows 下的字體設置

window 介紹 char 多用戶 版本 love spa 中心 AC 原文地址(直接看原文): http://loveseaside.iteye.com/blog/648941 【簡介如下】 IBM DB2 在版本 8.0 以上就提供了一個跨平臺的基於 Java 的

Spring Boot連接DB2查詢結果時報錯“java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z”的解決辦法

log -name aso maven -i 發現 AS dep cnblogs 關於在maven項目中如何添加DB2的坐標的詳細,見:https://www.cnblogs.com/zifeiy/p/7918554.html Spring Boot項目中的applicat

AbstractMethodError: com.ibm.db2.jcc.c.b.isValid(I)Z解決辦法

在獲取資料庫連線過程中發生了這個問題 環境: tomcat8.5.16 java8 資料庫驅動db2jcc10.1.jar 沒有配置連線池 根據錯誤提示,這個資料庫驅動jar包中沒有isValid方法

建聯合主鍵報錯DB2 Database Error: ERROR [42997] [IBM][DB2/AIX64] SQL0270N Function not supported (Reason c

CREATE TABLE "mmm"."test" (   --建表語句   "A" DATE,   "B" VARCHAR(36),   "C" VARCHAR(50),   "D" VARCHAR(25) not null,   "E" VARCHAR(15) not

IBM Db2 Warehouse Destination Documentation

Use IBM Db2 with Segment to get all of your event and Cloud Source data in a warehouse built by IBM. This guide will walk through what you need to know to

DB2 SQLCODE=-964日誌檔案滿的問題

Sql程式碼   db2 update db cfg for MY_DATABASE using LOGFILSIZ xxx  db2 update db cfg for MY_DATABASE using LOGPRIMARY 60   db2 update db

IBM DB2下載地址

DB2 10.5 data server trial for AIX® v10.5_aix64_server_t.tar.gz (1.51 GB) DB2 10.5 data server trial for Windows® on 32-bit AMD and

db2 sqlcode sqlstate 說明

sqlcode sqlstate 說明 000 00000 SQL語句成功完成 01xxx SQL語句成功完成,但是有警告 +012 01545 未限定的列名被解釋為一個有相互關係的引用 +098 01568 動態SQL語句用分號結束 +100 02000 沒有

IBM DB2 日常維護彙總

 1.DB2產品的級別有那些?   企業版的NTERPRISEEDITION   工作組版WORKGROUPEDITION   企業擴充套件版ENTERPRISEEXTENDEDEDITION   個人版的PERSONALEDITION   衛星版的SATELLITEEDIT

DB2執行插入語句 57016 SQLCODE=-668 原因碼 "7"錯誤的快速解決辦法

出現 你是 執行 name cmd nbsp sys tab test DB2數據庫執行insert插入語句報57016錯誤(表不活動) 原因:1.修改了表結構。2.刪除了主鍵。或者修改了主鍵。 如果你是用的時控制臺,可以使用 REORG TABLE 表名 ; 如果使用

DB2:在緩沖池 "1" 中當前沒有任何頁面可用。. SQLCODE=-1218, SQLSTATE=57011, DRIVER=3.61.75

-1 width splay border span add title ima 問題 服務器端DB2數據庫最近頻繁報錯: 在緩沖池 "1" 中當前沒有任何頁面可用。. SQLCODE=-1218, SQLSTATE=57011, DRIVER=3.61.75 試驗發現簡

DB2 不指定Schema調用存儲過程失敗 SQLCODE=-440, SQLSTATE=42884

DB2 不指定Schema調用存儲過程失敗 SQLSTATE=42884 Schema和訪問DB的用戶名不一致 ■ 現象DB2,Schema和訪問DB的用戶名不一致。調用存儲過程時必須指定Schema,否則Error。 ■ 錯誤代碼存儲過程 SET SCHEMA = "QUO

DB2中SQLSTATE=57016 SQLCODE=-668 解決方案

公司北京開課唯識 作者:向秋鋒 場景: 如圖sql報了一個錯-688。查看了一下,sql語句沒有錯誤。導致原因是:針對資料庫物件的大量操作,如反覆地刪除表,儲存過程,會引起系統表中資料的頻繁改變, 在這種情況下,考慮對系統表進行REORG操作 解決辦法

DB2中常見sqlCode原因分析

DB2中常見sqlCode原因分析 000 | 00000 | SQL語句成功完成 01xxx | SQL語句成功完成,但是有警告 +012 | 01545 | 未限定的列名被解釋為一個有相互關係的引用 +098 | 01568 | 動態SQL語句用分號結束 +100 | 02000 |

db2 報錯 sqlcode=-420 自動型別轉換的問題

今天在測試遇到一個問題,前臺點選頁面查詢資料時報錯: [Error Code: -420, SQL State: 22018] DB2 SQL Error: SQLCODE=-420, SQLSTATE=22018, SQLERRMC=DECFLOAT, DRIVER=4.18.60 根據sq

出現 DB2 SQL Error: SQLCODE = -1773, SQLSTATE = null 錯誤的原因及解決方法

1 錯誤描述 在專案從虛擬機器遷移到容器雲之後,生產環境在執行某個資料庫下所有表的新增及更新操作的時候,都會遇到 BD2 報出來的SQLCODE = -1773, SQLSTATE = null異常,從而導致該庫下所有涉及到新增和更新的操作全部失敗,具體的錯誤日誌如下: 2

IBM公司DB2資料庫的ODBC驅動的下載地址及相關資料

請單擊各個檔案旁的“下載”連結來下載這些檔案。 訂單號: 總大小: 44429250 13.43 MB 補丁包: DSClients-nt32-odbc_cli-9.5.900.456-FP009 詳細資訊* IBM Data Server Driver for ODBC and

資料庫報錯:DB2 SQL error: SQLCODE: -964, SQLSTATE: 57011, SQLERRMC: null; db2 get db cfg for 資料庫名稱

資料庫報錯:DB2 SQL error: SQLCODE: -964, SQLSTATE: 57011, SQLERRMC: null; db2 get db cfg for 資料庫名稱 資料庫日誌大小=LOGFILSIZ*4*(LOGPRIMARY+LOGSE