I am writing a program which loads a transaction file that is sorted by transaction ID to a database table so that it's batched by payment type with sequential non-repeating numbers. I thought I could do it by using a table to sort the transactions by payment type and then releasing the records and incrementing the batch number whenever the payment type changes when it loads to the database table, but I see no way to sort the table. Am I barking up the wrong tree or missing something completely?