View Single Post
  #4 (permalink)  
Old 07-01-09, 20:19
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,775
Create a new table with the same fields as the existing table.

Insert into the NEW table, using a sub-select from the original table as the source for the select.

You can also use the Create Table As syntax to create a table which contains data from a select...

Code:
CREATE TABLE mts400_results_NEW AS
  Select result_time, epoch, nodeid, parent, voltage * 625/1024 as voltage, humid, humtemp, prtemp, press, taosch0, taosch1, accel_x, accel_y
  From mts400_results_1
From a safety viewpoint, I would not try to update the data 'in place.' Create the new table, copy the old data into the new table, processing the voltage as you do so.

Then, after you verify that the voltage data is correct, use the new table as a data source for updating the existing table
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Reply With Quote