declare @userNum varchar(50),@waterNum varchar(50),@tableName varchar(20),@sql varchar(max)
select @userNum=YHBH,@waterNum=SBBH,@tableName=vlg.vlgFZ from YHXX yh left join vlgInf vlg on yh.vlgName=vlg.vlgName where (yh.vlgName+yh.YHDZ) like ‘恒大金碧天下13幢1单元0101室%‘
set @sql=‘select JZQID,SBBH from ‘[email protected]+‘ where YHBH=‘‘‘[email protected]+‘‘‘ and SBBH=‘‘‘[email protected]+‘‘‘‘
exec(@sql)
where YHBH=‘ ‘‘[email protected]+‘ ‘‘ and SBBH=‘‘‘[email protected]+‘‘‘‘
边界 ‘ 单引号 用‘ 单引号 转义
时间: 2024-10-09 10:33:08