Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update/Modify

SG141
Active Participant
0 Likes
849

Based on checking certain criteria i have to change the value of a field in data base table to a new one. Which one would be a better option Update or Modify......

6 REPLIES 6
Read only

Former Member
0 Likes
827

if its one field.. then update else modify

Read only

Former Member
0 Likes
827

HI,

Modify is better to avoid the multiple entries.

select single * from dbtable into wa where .......

wa-field3 = 'testing'.

modify dbtable from wa.

Regards

SAB

Read only

Former Member
0 Likes
827

HI,

You can use modify always.. it does two things...

if record is already exist it acts as update

if record does not exist then it acts as insert.

if you are sure that the record already exist then use UPDATE..

Thanks

Mahesh

Read only

SG141
Active Participant
0 Likes
827

Record already exits..I'll the primary key of the table and replace one of the fields in that table.

So, I'll go for Update.

Read only

0 Likes
827

GOOD CHOICE

Read only

0 Likes
827

Hi,

It it is a standard table please do not go for direct update or modify. if it is a custom table and If you want to update the primary key itself , then delete the record and then modify. before deleting please check the dependencies

aRs