SQL Script to add calculations to fields
Posted on 2014-04-11
I have a MySQL database with 10 fields, for example. I have several, so I am looking for a general idea:
Field1, Field2, Field3 .... Field10 will be the Field names.
I will have Field11 and Field12 as Integer fields that are sometimes empty.
What I need is to take Field1/Field2 to be the value to populate in the empty Field11 column.
I would then need to take Field6+Field7 and populate the empty Field12 values with those calculations.
I would like to run a script every now and then which does this calc update.