i think this one is simple but i cant find a good example.
What i have is three columns. StartPrice EndPrice Dividens and results. Each of these is a decimal(10,2) column in MySql. What i’m looking for is (preferably) is an update statement that basically will do Dividens / (AddPrice + EndPrice) and return the decimals.
Example:
Dividens (AddPrice + Endprice) = result
2.09 / (7.52 + 10.52) = .11
7.40 / (1.75 + 1.25) = 2.47
All columns are decimal(10,2)
I’m looking for basically
update tblmath
set result = '<this is what i cant do>
where result = null
Assuming your table is called
tblmathand you’re trying to update a column calledresultto contain the result of the calculation, this should work for you:BTW: You misspelled “Dividends”, but I preserved the misspelling in the SQL above.