09-22-2008 2:13 PM
Hello Everyone,
Could anyone please give a suggestion about how to overwrite the record with part of same primary key?
I have 5 key fields.
A1
A2
A3
A4
A5
I have to overwrite the record if A5 changes with same A1 A2 A3 A4.
I cannot take off A5 as part of primary key. If I use modify or insert, its creating a new record with the new A5. But I am still having the old record in the table (with old A5), which I don't want it to be there.
Thank you,
Rushi
09-22-2008 2:47 PM
hi,
That's right.
u have to delete record from database table .....
then u can add a new record...
use delete <database_table> from table <internal_table>
09-22-2008 2:16 PM
hi,
logically, you have to delete the old record in a separate step!
hope this helps
ec
09-22-2008 2:16 PM
09-22-2008 2:33 PM
Hello,
Thank you for all your replies.
Can I use "delete from 'table name' where" and then insert the new record?
Rushi
09-22-2008 2:36 PM
09-22-2008 2:17 PM
Try using UPDATE...if still doesnot work then first delete the record and then insert the record..
09-22-2008 2:19 PM
Hi,
One thing you can do, Make A5 as non key field (If possible). Then modify it.
If not possible delete the old record and insert a new record.
09-22-2008 2:47 PM
hi,
That's right.
u have to delete record from database table .....
then u can add a new record...
use delete <database_table> from table <internal_table>