Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Efficient Paging Pain
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01239477
Message ID:
01373429
Views:
33
>Hi, Glenn,
>
>I decided to give this a crack - I'm guessing you're getting an error message on the second CTE.
>
>The first CTE (InvRows) can be used in a SELECT, or INSERT/UPDATE/DELETE statement - but I'm not sure a CTE can be used in a subsequent CTE. (The problem is that the error message I'm getting is a general syntax one, so I can't tell for certain).
>
>Anyway, instead of the code that starts with "With InvRecs AS"....you might want to try:
>
>
>SELECT * FROM (
>      SELECT uidclient, uid, description, 
>            ROW_NUMBER() OVER (order by uid) as RowNumber 
>       FROM  Invrows ) InvRowsTemp
>  Where RowNumber >= @RowStart and RowNumber <= @RowEnd 
>
>
>
>There are probably multiple ways to solve this, but let me know if that helps...
>Kevin

Hi Kevin,

I'm looking right now for your article about pagination in SQL Server & ASP.NET and could not quickly find it. Could you please give a link?

Thanks.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform