Subject | Re: What's the best way to do this? |
---|---|
Author | dirtyrentedmule |
Post date | 2005-02-22T18:35:35Z |
Unless you somehow have circular references, you can programatically
find the relationships and follow them all down to the tables that
hold no foreign keys, and work backwards.
OR
You could remove all constraints, add the table data, and readd the
constraints. I think this is how gbak restores a database.
Jason
--- In firebird-support@yahoogroups.com, "Myles Wakeham" <myles@t...>
wrote:
find the relationships and follow them all down to the tables that
hold no foreign keys, and work backwards.
OR
You could remove all constraints, add the table data, and readd the
constraints. I think this is how gbak restores a database.
Jason
--- In firebird-support@yahoogroups.com, "Myles Wakeham" <myles@t...>
wrote:
> I have to copy a series of about 40 tables from an ODBC data sourceinto a
> Firebird SQL database everynight at 12 midnight. This is a 'DataWarehouse'
> dump of information from a transactional system to Firebird. All data inlike to
> Firebird that was there before, can be completely deleted but I'd
> keep the table structure intact.the tables
>
> I thought this would be a simple DELETE * from TABLE NAME for each table
> that has to be transferred over, but there are primary/foreign key
> relationships between the tables and therefore I can't delete out
> without upsetting the data integrity in the database.
>
> What is the best practice in these situations?
>
> Myles
>
> ===========================
> Myles Wakeham
> Director of Engineering
> Tech Solutions Inc.
> Scottsdale, Arizona USA
> Phone (480) 451-7440
> Web: www.techsol.org