Skip to Content
0
Former Member
May 28, 2008 at 09:24 AM

Handling update and insert in a database table

322 Views

Hi guys,

I have some data in a database table which I created.Every day some new records come into the table.what i want is that if the account no of the new record which comes say today already exists in the table hen I do not insert a new record but only update the value field related to the account no.

Being more explicit:

say my table has two columns

acc no value.

10 3500

Now as for the existing account no 10 say a new value 300 comes in I want that a new field is not created rather the value is made to 3500+300.

and if an accno 20 comes which is not there in table a new row is aded for that.

Any suggestions would be appreciated.

Thanks