Subject Interbase / Delphi stored procedure
Author Wayne@bruton.co.za
Hi all,

I have a history table and a current table in my app. The fields are
identical in each.

the fields are:
shift, date, employee

combined they are unique.

say my current table is February2001_rotation_tbl. Now it is nearing
the end of february and the march rotations need to be done. I want
1> a stored procedure to copy all the data from
february2001_rotation_tbl to the history table
and then
2> afterwards delete all the records in february2001_rotation_tbl
and
3>rename february2001_rotation_tbl as March2001_rotation_tbl.

Can this be done? and if so how? I have to consider that this table
will have foreign keys in it and will be refered to by other tables.
I may have to rather have a tablename that remains the same and
doesn't change, say like monthy_rotation_tbl ???

TIA

Wayne Bruton