(一) 将数字替换成汉字 第一步,去重查询 使用distinct关键字先对该字段值进行去重查询,看共有几种情况 --查询指定区间内表停诊字段的值 SELECT DISTINCT T.CLOSE_TZ FROM CONSULT_SCHEDULE T WHERE T.SCHEDULE_DATE BETWEEN TO_DATE('2018-01-01', 'yyyy-MM-dd') AND TO_DATE('2018-02-28', 'yyyy-MM-dd'); 查询结果:共有3种情况 第二步,区…
具体报错信息: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter '__frch_ecoYksKpi_0' not found. Available parameters are [list, param1] at org.mybatis.spring.MyBatisExceptionTranslator.tran…
错误信息:nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.reflect.UndeclaredThrowableException ### The error may exist in file [D:\apache-tomcat-7.0.52\webapps\chp-loan\WEB-INF\classes\m…
一.所有的指定id的模型类的同一个字段进行批量更新 实际上: update t set fileld='xx' where id in (id1,id2,...,idn) 代码: <update id="updateBatch" parameterType="Map"> update t_name set name = #{name,jdbcType=VARCHAR} where autoid in ( <foreach collection=&q…
功能:实现将表result_good_city_dzl中的字段lat更新为表 result_good_city_lh中的lat,条件是两个表中的id一样 即: update result_good_city_dzl a set a.lat=(select lat from result_good_city_lh b where a.id=b.id and b.lat!=0) DELIMITER $$DROP PROCEDURE IF EXISTS update_result_good_city_…
作为示例,我们在这里使用名为testdb的数据库,并且在其中创建两张一模一样的表: drop table if exists test_table_1; create table test_table_1 ( name varchar(30) primary key, age integer ); drop table if exists test_table_2; create table test_table_2 ( name varchar(30) primary key, age int…
转载:http://blog.csdn.net/tolcf/article/details/39213217 第一种方式 <update id="updateBatch" parameterType="Map"> update aa set a=#{fptm}, b=#{csoftrain} where c in <foreach collection="cs" index="index" item=&q…