Adding to an existing value in my database

liunx

Guest
is there anyway when relating vb.net to access that i can add to a field in the database.

ie totalhours = 48 can i add 3 so totalhours = 51

without using to database accesses one to get the value, then add it in the vb code. then update it again.

is there away this can be done more efficentlySomething like this:

UPDATEYourTable
SETfundedYear1 =
(SELECTtotalhours + 3 AS Total
FROMYourTable
WHERE(id = '123'))
WHERE(id = '123')


Eric
 
Back
Top