且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在varchar类型查询中使用像sql server一样

更新时间:2023-01-30 13:41:02

试试这个



try this

SET @vQuery1='select B.schname as schname,COUNT(A.cname) as total_child from ' + @ChildTblName + ' A, 
               SCHMAST B where A.cname like ''%11111%'' and  B.DCODE='+ @DistrictID +' AND B.BCODE='+ @BlockID +'and B.VCODE='+ @VillageID +''