Update Data in Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AliBahadori
    New Member
    • Feb 2007
    • 2

    Update Data in Table

    I Have a query that select Account number and Sum Debit and Credit and I want uptade this information to another tabel with the same filed.
    I use update query with this cod below, but the system sent an error that for this you have to use update query however I used upedate query.

    Code:
    UPDATE [Detail Account], SumJournal
    SET SumJournal.SumOfCredit = [Detail Account]![Debit],
        SumJournal.SumOfDebit = [Detail Account]![Credit]
    WHERE (([SumJournal]![AccCod] Like [Detail Account]![DetailCod]));
    Last edited by NeoPa; Feb 19 '07, 02:03 PM. Reason: Tags
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    It's best if you don't store calculated data in a table and just calculate it when you need it.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32668

      #3
      Originally posted by Rabbit
      It's best if you don't store calculated data in a table and just calculate it when you need it.
      See (Normalisation and Table structures) for a fuller explanation of this issue.

      Comment

      • AliBahadori
        New Member
        • Feb 2007
        • 2

        #4
        Originally posted by Rabbit
        It's best if you don't store calculated data in a table and just calculate it when you need it.
        Dear Rabbit
        Thank you so much for your Cod and also for your advice.
        I think I have to change my mind and change may database, you are completely right.

        Thanks
        Ali

        Comment

        Working...