Spectre5000
September 20th, 2001, 11:24 AM
There isn't a forum out here specific for SQL, and seeing as I am writing this in VB I figured I would post
this question out here. The question:
Is there a way to move data between 2 tables in a database? I know I could just query the information in one
table, and then use the update statement to update the new table, and then delete the old information from
the first table. But I want to know if there is a way to move information from table 1 to table 2. Example:
Table 1 is a ticketheader table, containing various information about open tickets. Table 2 is the ticketheaderhistory
table, which contains the same information as table 1, only the information in table 2 is all of the closed
tickets. I want to take some information in table 1 and put it into table 2 when the ticket is closed/cashed out,
without having to do a query, an update, and then a delete. Can this be done in one step? Can the information
be moved from table 1 to table 2 in one step, thereby eliminating the need for query/update/delete method?
this question out here. The question:
Is there a way to move data between 2 tables in a database? I know I could just query the information in one
table, and then use the update statement to update the new table, and then delete the old information from
the first table. But I want to know if there is a way to move information from table 1 to table 2. Example:
Table 1 is a ticketheader table, containing various information about open tickets. Table 2 is the ticketheaderhistory
table, which contains the same information as table 1, only the information in table 2 is all of the closed
tickets. I want to take some information in table 1 and put it into table 2 when the ticket is closed/cashed out,
without having to do a query, an update, and then a delete. Can this be done in one step? Can the information
be moved from table 1 to table 2 in one step, thereby eliminating the need for query/update/delete method?