Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Chris writes "How can I supply parameters to my top clauses?My goal is to allow for paging results.The parameters would be pageSize and pageRequested
SELECT FirstName, LastNameFROM ( SELECT TOP 10 FirstName, LastName FROM ( SELECT TOP 100 FirstName, LastName FROM Person_t ORDER BY FirstName ASC ) x ORDER BY FirstName DESC ) yORDER BY FirstName ASC"