今天在做统计数据的时候,传入数组导致数据不显示.解决方式和大家分享一下: --参数@CompanyName='北京,天津,上海' DECLARE @PointerPrev int DECLARE @PointerCurr int DECLARE @TName nvarchar(100) Set @PointerPrev=1 while (@PointerPrev < LEN(@CompanyName)) Begin Set @PointerC
小结一下ibatis框架下,传入参数为数组类型或者是List类型的sql写法.标签里面都不需要表名 1.传入字符串数组,不需要标明parameterClasss,数组和List类型对象一样都可以用<iterate>标签进行遍历. <select id="selectOrgIdByNameStr" resultClass="Integer"> SELECT id FROM org WHERE name IN <iterate close=
--数组 var arrs= ['test1','test2','test3'];--变字符串 var instring = "'"+arrs.join("','")+"'";--拼接 var sql = "select * from table where CreateUser in ("+instring+")";--结果 select * from table where CreateUser in
1.首先用PL/SQL创建package create or replace package excuteBatchOperate as type sqlStr_Array ) index by binary_integer; procedure excuteBulkData(sqlStr in sqlStr_Array); end excuteBatchOperate; 2.在packagebody内创建存储过程 create or replace package body excuteBat