It seems that Row_num() function does not works with Dynamic sql having if
blocks to check input parameters for null and sp_executesql t excute the
query...Please help me to find a necesasry solution..Hari
Can yopu post sample data + an expected result to be tested?
"Hari" <Hari@.discussions.microsoft.com> wrote in message
news:8CE0B2A3-4347-4983-BD35-A2B502BFFD8D@.microsoft.com...
> It seems that Row_num() function does not works with Dynamic sql having if
> blocks to check input parameters for null and sp_executesql t excute the
> query...Please help me to find a necesasry solution..|||Have you considered using key values rather than page numbers for paging?
Using key values is significantly faster than row numbering techniques can
ever be b/c each page query is simply an index range scan rather than having
to materialise row numbers in a result-set simply to work out which rows
make up page n. It also more accurately accounts for movements in the
underlying database.
Regards,
Greg Linwood
SQL Server MVP
http://blogs.sqlserver.org.au/blogs/greg_linwood
Benchmark your query performance
http://www.SQLBenchmarkPro.com
"Hari" <Hari@.discussions.microsoft.com> wrote in message
news:8CE0B2A3-4347-4983-BD35-A2B502BFFD8D@.microsoft.com...
> It seems that Row_num() function does not works with Dynamic sql having if
> blocks to check input parameters for null and sp_executesql t excute the
> query...Please help me to find a necesasry solution..
No comments:
Post a Comment