I need to make a view in an application for a table containing many hundreds of thousands of records. For obvious reasons, I do not want to immediately extract them.
The convention is to make stored procedures for querying database tables, so my plan was to save the stored procedure to return the interval of records (e.g. records from 2000 to 3000). I know a trick to use a nested query to get a range of records using TOP
, but as far as I can tell, you cannot parameterize the TOP
argument.
This will be used in conjunction with datasets and a DataTable
in a C # application.
How can I do it?
zneak source share