create procedure proNewSreach
(
@theName varchar(200),
@theHy int,
@theArea int
)
as
select ID,xmName,xmHy,xmArea from zsInfo
where
xmName like '%'+@theName+'%'
or
xmHy like '%'+@theHy+'%'
or
xmArea like '%'+@theArea+'%'
go这段代码错在那里啊?
(
@theName varchar(200),
@theHy int,
@theArea int
)
as
select ID,xmName,xmHy,xmArea from zsInfo
where
xmName like '%'+@theName+'%'
or
xmHy like '%'+@theHy+'%'
or
xmArea like '%'+@theArea+'%'
go这段代码错在那里啊?
解决方案 »
- 如何才能使ASP.NET(C#)页面不上下滑动。
- freetextbox 控件 ftb.imagegallery.aspx页面的 插入图片 有问题
- 在类的get set 中 对Datetime 格式化
- CopyTo方法? Petshop4中
- GridView如何取得列?
- 未能加载视图状态??
- 连接***错误,系统找不到指定的路径。您想将来继续尝试此连接吗?
- 求救啊!如何使用程序全选repeater中的复选框,同时通过程序判断那些复选框被选择
- asp:HyperLinkColumn 的问题!
- 请问动态生成控件或者页面怎么做啊
- 如何在有条件的事件发生前,给出提示信息????
- 站点应用了FORM认证,如何让某一页不需要认证就可以访问?
(
@theName varchar(200),
@theHy int,
@theArea int
)
as
select ID,xmName,xmHy,xmArea from zsInfo
where
(xmName like '%'+@theName+'%')
or
(xmHy like '%'+@theHy+'%')
or
(xmArea like '%'+@theArea+'%')
go
--drop procedure proNewSreach
proNewSreach @theName = '天河',@theHy = '2',@theArea = '1'服务器: 消息 245,级别 16,状态 1,过程 proNewSreach,行 8
将 varchar 值 '%' 转换为数据类型为 int 的列时发生语法错误。
也是一样的
or
xmArea like '%'+@theArea+'%'
这两个不多,int类型的不能用like查询
也谢谢各位热心帮助。
(
@theName varchar(200),
@theHy int,
@theArea int
)
as
select ID,xmName,xmHy,xmArea from zsInfo
where
xmName like '%'+@theName+'%'
or
xmHy = @theHy
or
xmArea = +@theArea这样试一试,看看可不可以
(
@theName varchar(200),
@theHy int,
@theArea int
)
as
select ID,xmName,xmHy,xmArea from zsInfo
where
xmName like '%'+@theName+'%'
or
xmHy = @theHy
or
xmArea = @theArea不好意思,上面的不对,试一试这个