日期:2014-05-18 浏览次数:20578 次
;WITH ViewList ( [row], PartNumber, SerialNumber,EndUserName,PurchaseDate,DealerName,EndUserProvince,EndUserCity,EndUserAddress,LotNumber,DeliveryDate,ReceiptDate) AS (SELECT ROW_NUMBER() OVER (ORDER BY ReceiptDate ASC) [row],PartNumber, SerialNumber,EndUserName,PurchaseDate,DealerName,EndUserProvince,EndUserCity, EndUserAddress,LotNumber,DeliveryDate,ReceiptDate FROM [dbo].[ScannerWarranty]) SELECT [row], PartNumber, SerialNumber,EndUserName,PurchaseDate,DealerName, EndUserProvince,EndUserCity,EndUserAddress,LotNumber,DeliveryDate,ReceiptDate FROM ViewList WHERE [row] BETWEEN 91 AND 100
;WITH ViewList ( [row], PartNumber, SerialNumber,EndUserName,PurchaseDate,DealerName,EndUserProvince,EndUserCity,EndUserAddress,LotNumber,DeliveryDate,ReceiptDate) AS (SELECT ROW_NUMBER() OVER (ORDER BY GETDATE() ) [row],PartNumber, SerialNumber,EndUserName,PurchaseDate,DealerName,EndUserProvince,EndUserCity, EndUserAddress,LotNumber,DeliveryDate,ReceiptDate FROM [dbo].[ScannerWarranty]) SELECT [row], PartNumber, SerialNumber,EndUserName,PurchaseDate,DealerName, EndUserProvince,EndUserCity,EndUserAddress,LotNumber,DeliveryDate,ReceiptDate FROM ViewList WHERE [row] BETWEEN 91 AND 100
------解决方案--------------------
ORDER BY ReceiptDate,GETDATE()
------解决方案--------------------