SQLServer下的分页代码_仅形式,代码未通过调试

DECLARE @ToScanInvoice TABLE
(
    RowNumber int IDENTITY(1,1),
    newid int
)

insert into @ToScanInvoice
select doc.docid from doc
where doc.docid in
(
    select God.newid
    from @NeedScanInvoice as God
)
and doc.isscaned = 0
order by doc.docid asc

select doc.docid,doc.code,doc.clientname,doc.billdate,doc.doctype from doc
where doc.docid in
(
    select God.newid
    from @ToScanInvoice as God
    where RowNumber between " + ((intPage - 1) * intPageSize + 1)+" and "+intPage * intPageSize+@"
)
and doc.isscaned = 0

posted on 2010-08-05 11:38  冰危节奏  阅读(153)  评论(0)    收藏  举报

导航