I
Ilyas
Hi all
I need to implmenet paging across different tables. The tables all
have a different name eg Data01, data02 data03 etc, however they are
columns which are common to each table, but each table also has some
unique columns
My questions is that I want to display data from any one of these
tables - I wont know which one until runtime, but since they contains
large amounts of data, I only want to display say 10 at a time. Also
the database is on sql server 2000 so I cant use RowNumber
I am thinking of using dynamic sql, so I would have a stored procedure
which takes the following:
selectClause - the fields to pull out
tablename - name of the table to get data from
whereClause - any filter criteria to apply
sortColumn - the column to sort on
sortDirection - the direction to sort on
Inside this stored procedure I would have ot build up some sql and
then execute it. I cant think of any other way to do it. Can anyone
suggest any pointers or alternative options?
Many thanks
I need to implmenet paging across different tables. The tables all
have a different name eg Data01, data02 data03 etc, however they are
columns which are common to each table, but each table also has some
unique columns
My questions is that I want to display data from any one of these
tables - I wont know which one until runtime, but since they contains
large amounts of data, I only want to display say 10 at a time. Also
the database is on sql server 2000 so I cant use RowNumber
I am thinking of using dynamic sql, so I would have a stored procedure
which takes the following:
selectClause - the fields to pull out
tablename - name of the table to get data from
whereClause - any filter criteria to apply
sortColumn - the column to sort on
sortDirection - the direction to sort on
Inside this stored procedure I would have ot build up some sql and
then execute it. I cant think of any other way to do it. Can anyone
suggest any pointers or alternative options?
Many thanks