Hi
I would update a record in my table copying some data from another record within the same table.
For example
TableName : MyTAB
Fields : KeyField,FieldX, FieldY, FieldZ
Value : 1 A B C
2 D E F
I would copy the FieldX and FieldY values from the record 2 in the same field of the record 1 . Is It Possible to do this with a single UPDATE instruction ? Something like
UPDATE MyTab
SET FieldX = T.FieldX,
FieldY = T.FieldY
FROM MyTAB T
WHERE KeyField = 1 and T.KeyField = 2
I would update a record in my table copying some data from another record within the same table.
For example
TableName : MyTAB
Fields : KeyField,FieldX, FieldY, FieldZ
Value : 1 A B C
2 D E F
I would copy the FieldX and FieldY values from the record 2 in the same field of the record 1 . Is It Possible to do this with a single UPDATE instruction ? Something like
UPDATE MyTab
SET FieldX = T.FieldX,
FieldY = T.FieldY
FROM MyTAB T
WHERE KeyField = 1 and T.KeyField = 2