列名或所提供值的数目与表定义不匹配。

goodcaoyu goodcaoyu 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

begin tran
insert into  MT_InspectItem 
select
serialno,
FeeItemCode,
[entry name],
Scope,
SpecimenId,
SpecimenName,
OrgId,
OptEmployeeId,
OptEmployeeName,
OptTime,
SpellCode,
StrokeCode,
Memo,
Status,
IsDelete,
InspectItemUnitId,
InspectItemUnitName

from  ws  where [entry name] not in(select d.[entry name] from (select a.* from  ws  a, MT_InspectItem  b where  b.InspectItemName like CONCAT('%',a.[entry name],'%')) d group by d.[entry name] having COUNT([entry name])>1
) and [amount of money] is not null 

rollback tran

 

执行红色部分是没问题的,看到很多人的解决办法是说插入时指定列,但是现在已经指定列了,还是报这个错,麻烦大佬们帮忙看下问题在哪

...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
goodcaoyu
MS-SQL Server 34,876 成员 254,635 内容