Board index » cppbuilder » Modify and Insert
Deborah
![]() CBuilder Developer |
Deborah
![]() CBuilder Developer |
Modify and Insert2005-04-12 04:39:39 AM cppbuilder111 How do we modify an existing record and insert it as new record so that we can have the previous record as it was and the new record with the update. |
Daniel Stevenson
![]() CBuilder Developer |
2005-05-12 04:05:02 PM
Re:Modify and Insert
I might be missing the complexity of your question, but you can do this in
two steps 1 - obtain the data from the existing record 2 - insert the data from previous into the the new record with it's modifications. I'm no wizz at SQL but I beleive you can do this in a single SQL call if you like INSERT INTO tblBlah (field1, field2, field3) VALUES (SELECT tblBlah.field1, tblBlah.field2, tblBlah.field3 FROM tblBlah WHERE tblBlah.field4 = BlahBlah); I haven't tested the above SQL...the above would only duplicate an existing record, you would need to modify the data as required in the insrt statement. "Deborah" < XXXX@XXXXX.COM >wrote in message Quote
|