Need a way to maintain sorted records for long periods of time. "select into" temp table? Hi Folks. I have a large number of records that are deliverd for web
view.
This may sound a bit wierd but its a user requirement.
I will have 100,000 records for view to the user. Currently I send
records to a temp tableand view them in a web page in java. There I use
the "<< < 1 2 3 4 5... 99 100 > >>" method at the bottom of the
page to allow the user to view the chunks.
select * from tablename where rowid > first chunk and rowid < next
chunk.
Now the user wishes to do a sort on up to 3 columns. This ruins my old
method of doing things. I cant scroll out chunks, because a select (
Select * from table name order by col8, col6, col3 ) does not reorder
the rowid.
So, then I thought of doing a 'Select into' a new temp table. But,
then I have to keep track of the new temp table name each time. I read
some where, and I hope its correct, that when you create a temp table
any new records are stored in order of the select into.
Every time the user chooses a new way to sort the data from the web
page, I think I should create a new Temptable, unless there is some way
to update the rowid on the original table. The sorted data order must
be maintailed over multiple sessions. there will be only one user, but
when he is done with this I can ditch the temp table till he creates
new data.
Im not sure this is the way to go. But, I need to finish it soon.
Suggestions? solutions? |