两表通过orderid=nid关联.匹配的才显示数据.如message id , phone 1 1 2 1@indextable nid 1那么只有ID=1的才显示出来,而id=2的不显示.
CREATE procedure P_GetPagedOrders2000 (@startIndex int, @endIndex int ) as set nocount on declare @indextable table(id int identity(1,1),nid int,phone VarChar) set rowcount @endIndex insert into @indextable(nid,phone) select id,phone from Message order by id descselect O.id,O.phone from Message O inner join @indextable t on O.id=t.nid where t.id between @startIndex and @endIndex order by t.id set nocount off RETURN GO那麻烦帮我看下这一段存储过程.. 运行的时候出现 将截断字符串或二进制数据。 语句已终止。 不知道怎么回事
你看看@indextable 表是什么内容
id , phone
1 1
2 1@indextable
nid
1那么只有ID=1的才显示出来,而id=2的不显示.
(@startIndex int,
@endIndex int
)
as
set nocount on
declare @indextable table(id int identity(1,1),nid int,phone VarChar)
set rowcount @endIndex
insert into @indextable(nid,phone) select id,phone from Message order by id descselect O.id,O.phone from Message O inner join @indextable t on O.id=t.nid
where t.id between @startIndex and @endIndex order by t.id
set nocount off
RETURN
GO那麻烦帮我看下这一段存储过程..
运行的时候出现
将截断字符串或二进制数据。
语句已终止。 不知道怎么回事