When sorting a table using the sort platform it is possible to check replace table.
There does not seem to be a boolean flag in the scrip call to do the same.
Other than renaming the new temp table to the old table name and closing the old table is there another solution?