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
浙公网安备 33010602011771号