首页 > 其他分享 >ORA-01406

ORA-01406

时间:2023-03-06 22:57:31浏览次数:36  
标签:column 01406 oracle data your ORA

今天某客户询问ORA-01406报错应该如何处理,查看信息如下,这里提示列被截断

这里提示的也很明显,使用一致的字符类型避免被截断

[oracle@rds ~]$ oerr ora 1406
01406, 00000, "fetched column value was truncated"
// *Cause: The fetched column values were truncated.
// *Action: Use the right data types to avoid truncation.

出现这种情况,也比较好判断,建议客户检查如下信息

1.变量值和表字段类型是否一致

2.数据库字符集与客户端字符集是否一致

 

网上也百度了下,搜索到了Oracle ask tom如下信息

HOW TO ASK A QUESTION:

1. Provide a detailed description of your problem. Include an overview of what you're trying to do. The steps you took that lead to the error. And anything you've tried to solve the issue.

2. Post a complete test case showing your problem. This is something we can copy-paste into our environment to reproduce your issue. This includes tables, data and anything else necessary for us to run your code (without editing it!)

3. DON'T SHOUT!

Anyway, on to the error. As the error implies, the value from a column has been shortened. To solve this, as the docs say

"Use the right data types to avoid truncation."

https://docs.oracle.com/en/database/oracle/oracle-database/18/errmg/ORA-00910.html#GUID-D9EBDFFA-88C6-4185-BD2C-E1B959A97274__GUID-4101690C-8DFD-4EF9-A5B5-63A6507C00EB

So you need to look at your code. The problem happens when there's a mismatch between the variable data type and the data type of the column.

To help you further, please provide the information from steps 1 & 2 above.

Thanks!

 

标签:column,01406,oracle,data,your,ORA
From: https://www.cnblogs.com/hanglinux/p/17185813.html

相关文章

  • oracle 数据库增删改查练习50例2.pdf
    --一、建表--1、根摇下面的内容创建表studentdroptablestudent;createtablestudent(snovarchar2(20),--primarykey,snamevarchar2(10),sageDATE,ssex......
  • Oracle使用MyBatis插入一条数据自动递增主键并返回主键值
    前期准备--创建t_table表createtablet_user(idnumber(10)primarykey,namevarchar2(20),agenumber(3));commentontablet_useris'用户信息表';......
  • ORA-12528: TNS: 监听程序: 所有适用例程都无法建立新连接
    今天通过DatabaseControl日常查看Oracle数据库情况,结果报错了:ORA-12528:TNS:listener:allappropriateinstancesareblockingnewconnections然后百度,看......
  • 使用navicat将oracle的sql脚本转换为mysql的sql脚本
    1.工具:navicat16(其他版本未测试,但过程应该差不多)2.准备两个数据库,oracle数据库和mysql数据库,(mysql数据库是空数据库,用于保存oracle中的数据)3.点击工具->数据传输  ......
  • linux 启动oracle
    1.切换oracle用户su-oracle2.查看oracle是否启动ps-ef|grepora_3.启动和关闭oraclesqlplus/assysdba--进入sqlplus界面SQL>startup--启动数据库实例SQ......
  • Oracle:层级查询
    Oracle中使用STARTWITH...CONNECTBYPRIOR...层级查询,查询出所有的层级关系一、指定父类递归查询所有的子级当数据库表中使用单个列表示上下级关系的场景时,使用SQL递归......
  • Kali中安装Oneforall(命令教程)
    Oneforall是一款好用的信息收集工具,很受欢迎安装教程切换用户(使用root用户)sudosu#然后输入kali的默认密码kali,就可以进入了切换到/opt目录下cd/o......
  • 浏览器控制台Application的local storage和session storage区别
    以下仅作为个人学习使用:(1)localStorage:仅在客户端(浏览器)中保存,不参与服务器的通信.设置:localStorage.setItem('Token',JSON.stringify(res.data))获取:localStorage.g......
  • MyBatis连接Oracle数据库的细节错误总结
    错误一错误提示org.apache.ibatis.exceptions.PersistenceException:###Errorupdatingdatabase.Cause:java.sql.SQLSyntaxErrorException:ORA-00911:无效字符......
  • 使用Oracle Outline锁定SQL执行计划
    文档课题:使用OracleOutline锁定SQL执行计划.1、相关概念Oracle的Outline技术可在某些情况下保证执行计划的稳定性.应用场景:A、短时间内无法完成SQL的优化任务,此时可使用out......