Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
Springboot项目,使用postgresql数据库,mybatis做持久层框架,
<select id="select" resultMap="BaseResultMap" parameterType="com.vo.TestVo">
select
<include refid="Base_Column_List" />
from test
where state='2'
<if test="comCode != null" >
and com_code=${comCode}
</if>
</select>
comcode的形式如:'1100'
执行查询时报错:
### The error may exist in file [D:\workspaceAll\eclipseWorkspace\test\target\classes\mapper\custom\test\QcTestDao.xml]
### The error may involve com.dao.TestDao.select-Inline
### The error occurred while setting parameters
### SQL: select id, comcode,name from test where state='2' and com_code=00000000
### Cause: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
建议:No operator matches the given name and argument type(s). You might need to add explicit type casts.
位置:286
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
建议:No operator matches the given name and argument type(s). You might need to add explicit type casts.
位置:286] with root cause
org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
建议:No operator matches the given name and argument type(s). You might need to add explicit type casts.
位置:286
解决方法:
<if test="comCode != null" >
and com_code=#{comCode,jdbcType=VARCHAR}
</if>
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer的更多相关文章
- Cause: org.postgresql.util.PSQLException: ERROR: cached plan must not change result type的前因后果
首先说明一下遇到的问题: PG数据库,对其中的某张表增加一列后,应用报错,信息如下: 应用使用相关框架如下:SpringBoot.MyBatis. ### Cause: org.postgresql. ...
- 【hibernate postgresql】注解@TypeDef/@Enumerated/数据库字段gender为枚举类型,从前台接受到实体后进行保存报错:org.postgresql.util.PSQLException: ERROR: column "gender" is of type gender but expression is of type character varying
数据库字段gender为枚举类型,从前台接受到实体后进行保存报错:org.postgresql.util.PSQLException: ERROR: column "gender" ...
- Caused by: org.postgresql.util.PSQLException: 错误: 语法错误 在 "desc" 、语法错误 在 "from" 附近
此错误一般是由于postgres的数据库表字段名定义与关键字重名所致: 如下,创建的数据库表包含名称为“desc”的字段与倒叙查询的desc关键字冲突会导致Caused by: org.postgre ...
- pg数据库org.postgresql.util.PSQLException: ERROR: "xxx" is not a sequence
问题场景 对pg数据表执行插入语句的时候,报错如下: { "timestamp": 1587012576734, "status": 500, "er ...
- PostgreSql问题:ERROR: operator does not exist: timestamp without time zone > character varying
问题描述: ERROR: operator does not exist: timestamp without time zone > character varying 解决方法: //注意 ...
- Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1
执行mybaits sql <delete id="delete4BatchesByLineCi" parameterType="java.util.List&qu ...
- Postgresql客户端不能远程连接数据库服务器 org.postgresql.util.PSQLException:
Postgresql安装完成之后,默认情况下是不允许远程客户端直接连接的,并且默认的监听配置文件里边,监听的服务器地址是127.0.0.1即:localhost 报如下错误: org.postgres ...
- org.postgresql.util.PSQLException: 栏位索引超过许可范围:3,栏位数:2。
org.postgresql.util.PSQLException: 栏位索引超过许可范围:3,栏位数:2. 今天在写完SQL进行查询的时候,后台一直报错显示上面的信息.看错误完全不知道原因,就重新检 ...
- org.postgresql.util.PSQLException:致命:抱歉,已经有太多客户了(org.postgresql.util.PSQLException: FATAL: sorry, too many clients already)
我正在尝试连接到Postgresql数据库,我收到以下错误: 错误:org.postgresql.util. PSQLException:致命:抱歉,已经有太多客户 错误是什么意思,我该如何解决? 我 ...
随机推荐
- TF_Server gRPC failed, call return code:8:Received message larger than max (45129801 vs. 4194304)
tensorflow_serving 遇到错误:gRPC failed, call return code:8:Received message larger than max (45129801 v ...
- 使用robot_pose_ekf对传感器信息融合
robot_pose_ekf是ROS Navigation stack中的一个包,通过扩展卡尔曼滤波器对imu.里程计odom.视觉里程计vo的数据进行融合,来估计平面移动机器人的真实位置姿态,输出o ...
- asp.net C# int 类型在32/64位环境下取值范围无变化
最近在学习中突然想到,我在64位环境下,int取值范围是否有变化?为了检测这个结果,我做了以下这个测试:1.环境:win7旗舰版64位+vs2010 sp1(版本号:10.0.40219.1SP1Re ...
- C#_基础题1-10套答案
one 1.用户输入一个整数,用if...else判断是偶数还是奇数 Console.WriteLine("请输入一个整数:"); ...
- GraphQL,你准备好了么?
一个多月前,facebook 将其开源了一年多的 GraphQL 标记为 production ready ( http://graphql.org/blog/production-ready/ ), ...
- Atitit 列出wifi热点以及连接
Atitit 列出wifi热点以及连接 配置命令 >netsh wlan /?1 显示已经有的配置netsh wlan show profiles1 C:\Users\Administrato ...
- 解决python3 UnicodeEncodeError: 'gbk' codec can't encode character '\xXX' in position XX
从网上抓了一些字节流,想打印出来结果发生了一下错误: UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position ...
- 浅谈.net中事务
.net中的事务 关键几点 概念:1:什么是事务 2:什么时候用事务 3:基本的语法 (1): 事务(Transaction)是访问并可能更新数据库中各种数据项的一个程序执行单元(unit).事务通常 ...
- Python3用gevent写个文件字符串查找器
[本文出自天外归云的博客园] 1.递归遍历目录下所有文件并通过finder函数定位指定格式字符串 2.用来查找字符串的finder函数是自己定义的,这里定义了一个ip_port_finder通过正则表 ...
- 【30集iCore3_ADP出厂源代码(ARM部分)讲解视频】30-9底层驱动之USART
视频简介:该视频介绍iCore3应用开发平台中RTC的基本配置方法以及在应用开发平台中RS-232, RS-485,RS-232的硬件实现方法. 源视频包下载地址:链接:http://pan.baid ...