List:General Discussion« Previous MessageNext Message »
From:Jim Date:October 7 2003 8:48pm
Subject:Can records be moved between tables without knowing columns
View as plain text  
Hi,

I need to be able to 'delete' records from table(s) but still maintain their
information
for an audit trail.

I'd rather not have a field for a deleted flag and have to condition all the
queries on the
table on the state of this flag.

Is it possible to move a record from one table to another easily?

Even better, can I do it opaquely (without knowledge of the columns)?
Something
like:
    "move from LiveUsers to DeletedUsers where ID=?;"
where all the fields in the first table get moved to the corresponding field
of the 2nd.  (If this is possible, what happens with autoincrement,
timestamp fields?)

Thanks for the help; I hope it isn't a trivial question.
I'm new at this; I didn't find anything on moving records in the list
archives.

Jim Cant
Thread
Can records be moved between tables without knowing columnsJim7 Oct
  • Re: Can records be moved between tables without knowing columnsDan Nelson7 Oct
  • Re: Can records be moved between tables without knowing columnsIllyes Laszlo8 Oct