CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    How to sum data of a column and write the result in a new field in the database

    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

  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: How to sum data of a column and write the result in a new field in the database

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured