I want to build a function called create_db_view_arr_tdt
in the main
agent to create a new database view database_view_arr_tdt
and sort it according to an existing column tdt
in the database arrivals
.
I already created the database view manually and this is the SQL code I use to sort the database view:
SELECT
*
FROM
arrivals
ORDER BY
tdt;
I want to run the code before each simulation run in the section “Before simulation run:” root.create_db_view_arr_tdt();
. Therefore the existing database view called database_view_arr_tdt
should be deleted and a new one should be created.
Does anybode know how i can delete the existing database view database_view_arr_tdt
and create a new one with the same name and sort it with the SQL code from above?
Many thanks for your help.
Best regards.