Click to See Complete Forum and Search --> : How to sum data of a column and write the result in a new field in the database


Dr_Michael
December 8th, 1999, 03:40 AM
I want to summarize all data of a specific column and the result to be written to a new field (or to a new table) of the database... (Access Database)

Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece

Chris Eastwood
December 8th, 1999, 04:39 AM
You should be able to use standard SQL for this, something along the lines of :


UPDATE yourtable SET columnname =
(SELECT SUM(columntosum) FROM othertable) WHERE
columnid = column_id_you_are_looking_for


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb