Closed liyuchuan86 closed 9 months ago
切换成sqlserve后 多条件生成的语句 SELECT COUNT(1) FROM (SELECT [Id],[Sort],[DocketType],[DocketKey],[HeadCode],[ZeroCycle],[DocketDateCodeType],[DocketNumCodeLen],[TailCode],[UpdateUserId],[UpdateTime],[LastDocketDate],[LastNumCode] FROM [Sys_DocketCodeRule] WHERE ((( 1 = 1 ) & ([HeadCode] like '%'+@MethodConst1+'%') ) & ( [DocketType] = @DocketType2 ))) CountTable 语法错误,经检查是扩展的条件连接方法用的And 改成 AndAlso 问题解决
SELECT COUNT(1) FROM (SELECT [Id],[Sort],[DocketType],[DocketKey],[HeadCode],[ZeroCycle],[DocketDateCodeType],[DocketNumCodeLen],[TailCode],[UpdateUserId],[UpdateTime],[LastDocketDate],[LastNumCode] FROM [Sys_DocketCodeRule] WHERE ((( 1 = 1 ) & ([HeadCode] like '%'+@MethodConst1+'%') ) & ( [DocketType] = @DocketType2 ))) CountTable
Blog.Core.Common\Extensions\Extention.Expression.cs
欢迎提交pr
提交个PR吧,可以成为贡献者
切换成sqlserve后 多条件生成的语句
SELECT COUNT(1) FROM (SELECT [Id],[Sort],[DocketType],[DocketKey],[HeadCode],[ZeroCycle],[DocketDateCodeType],[DocketNumCodeLen],[TailCode],[UpdateUserId],[UpdateTime],[LastDocketDate],[LastNumCode] FROM [Sys_DocketCodeRule] WHERE ((( 1 = 1 ) & ([HeadCode] like '%'+@MethodConst1+'%') ) & ( [DocketType] = @DocketType2 ))) CountTable
语法错误,经检查是扩展的条件连接方法用的And 改成 AndAlso 问题解决Blog.Core.Common\Extensions\Extention.Expression.cs