Consultor Eletrônico



Kbase P85777: How to create a duplicate of a given record with only one field changed?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/24/2004
Status: Unverified

GOAL:

How to create a duplicate of a given record with only one field changed?

FACT(s) (Environment):

Progress 9.x

FIX:

To take a given record in a table, create a duplicate of it and change the value of one field do something similar to the following:

DEFINE BUFFER AltCustomer FOR Customer.

FIND FIRST Customer NO-LOCK.

DO TRANSACTION:
CREATE AltCustomer.
BUFFER-COPY Customer EXCEPT CustNum TO AltCustomer
ASSIGN AltCustomer.CustNum = Customer.CustNum + 25000.
END.