sql2000里面的分页模糊查询存储过程
sql2000里面的分页模糊查询存储过程模糊查询变量字段如何写,求指教set@c='SELECTtop'+@a+'UserID,UserName,UserTel,User...
sql2000里面的分页模糊查询存储过程 模糊查询变量字段如何写,求指教
set @c='SELECT top '+@a+' UserID,UserName,UserTel,UserPosition,UserSex,UserBirthdate,MonthPrice,WorkPlace,ProfessionName FROM TB_UserInfo WHERE (UserTel LIKE '+'134%'+') OR (UserTel LIKE '+'135%'+') order by UserID desc'报错like后面报错 展开
set @c='SELECT top '+@a+' UserID,UserName,UserTel,UserPosition,UserSex,UserBirthdate,MonthPrice,WorkPlace,ProfessionName FROM TB_UserInfo WHERE (UserTel LIKE '+'134%'+') OR (UserTel LIKE '+'135%'+') order by UserID desc'报错like后面报错 展开
1个回答
展开全部
这样改一下就行了哦..
set @c='SELECT top '+@a+' UserID,UserName,UserTel,UserPosition,UserSex,UserBirthdate,MonthPrice,WorkPlace,ProfessionName FROM TB_UserInfo WHERE (UserTel LIKE ''134%'') OR (UserTel LIKE ''135%'') order by UserID desc'
set @c='SELECT top '+@a+' UserID,UserName,UserTel,UserPosition,UserSex,UserBirthdate,MonthPrice,WorkPlace,ProfessionName FROM TB_UserInfo WHERE (UserTel LIKE ''134%'') OR (UserTel LIKE ''135%'') order by UserID desc'
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询