Subject | Re: [firebird-support] create a table every year |
---|---|
Author | Thomas Steinmaurer |
Post date | 2012-06-12T08:46:21Z |
> I would like to save the old records in a separate table every year. On theAre you curious about the:
> end of the year I would Copy the empty main-table to an new table named like
> "Backup" and the old year for example. The new backup table needs no
> triggers.
>
>
>
> How can I realize this?
1) "every year" part, or
2) creating a structural identical table from an existing one
ad 1): The Firebird engine doesn't have a task scheduler / job engine
component included, thus you can use e.g. the OS task scheduling facility
ad 2): Firebird doesn't support something like CREATE TABLE ... AS
SELECT ... like Oracle (feel free to vote on:
http://tracker.firebirdsql.org/browse/CORE-796), so you have to query
the RDB$ system tables for the field names, data types etc.
Regards,
Thomas