qhnokia

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
ALTER procedure [dbo].[KFDABySearchString]
(
@searchstr varchar(100),
@pagesize int,
@pageindex int)
as

begin
--with temptbl as (SELECT ROW_NUMBER() OVER (ORDER BY DH desc)AS Row, * from KFDA O where isnull(TM,'') + isnull(ZRZ,'') like '%'+@searchstr+'%')
with temptbl as (SELECT ROW_NUMBER() OVER (ORDER BY DH)AS Row, * from KFDA O where isnull(TM,'') + isnull(ZRZ,'') like @searchstr)
SELECT * FROM temptbl where Row between (@pageindex-1)*@pagesize+1 and (@pageindex-1)*@pagesize+@pagesize

end

 

posted on 2010-07-24 11:27  其乐无穷  阅读(378)  评论(0编辑  收藏  举报