If you are looking to actually append the data from the working table to the ledger table, so that the two tables become one, you've got one choice with a couple of options in how you accomplish it. The simplest way is to simply INSERT the data from the working table into the ledger table. If that causes a performance issue, I'd unload the data to a flat file, load it into the ledger table, then truncate the working table. Without knowing a great deal more about your particular circumstances, I can't give you detailed instructions because the details would vary too much.
If all you need to do is combine the two tables for searching, I'd create a view that was a UNION of the two tables.
For More Information
- What do you think about this answer? E-mail the editors at editor@searchDatabase.com with your feedback.
- The Best Database Design Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your database design -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
This was first published in May 2002