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

Problem in DATABASE updation ?

Former Member
0 Likes
461

Hi ,

I have a custom table with fields say , F2 , F3 , F4 , F5 where F2 , F3 are key fields . Now added one more key field , F1 , in the begining ( Now the primary key is F1 , F2 , F3 ) .

Since this table is having data for all the fields before F1 additon , Now I want to fill the F1 where ever it is blank with a default one programmatically .

But DATABASE "UPDATE" statements is not working as it is searching for similar key values in DATABASE table , Whcih is not the case because F1 is blank .

INSERT and MODIFY are actually inserting another row , instead of updating the same row.

So , Please advise me how to advise on this .

Thanks in advance ,

Dharma

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
433

dear dharma,

i'm sorry, but as far as i'm concerned. you have to do an insert with filled f1 and an deleteion of the entry where the f1 field is empty.

modify/update won't work, because obviously there is no entry to update. What you want to do, is creating an new entry an delete the old one. so you have to choose these commands.

robert

3 REPLIES 3
Read only

Pawan_Kesari
Active Contributor
0 Likes
433

Insert new records with new value in F1 and delete old records..

Read only

Former Member
0 Likes
434

dear dharma,

i'm sorry, but as far as i'm concerned. you have to do an insert with filled f1 and an deleteion of the entry where the f1 field is empty.

modify/update won't work, because obviously there is no entry to update. What you want to do, is creating an new entry an delete the old one. so you have to choose these commands.

robert

Read only

Former Member
0 Likes
433

Hi Dharama,

read the table first with old entries ..

then update primary with new field by varying the F2,f3 and other fields.

Regards,

Prabhudas