J, Use the view! It can be a temp view:
CREATE TEMP VIEW SumStatement (famNo, SumAR) + AS SELECT FamNo, SUM (ar) FROM stmtdet + GROUP BY FamNo UPDATE stmtbill SET col1 = SumAR + FROM stmtbil lt1, SumStatement t2 + WHERE (t1.famno = t2.famno) + AND (t1.invdate > (.#DATE - 30)) (IF invdate is in t2, you will have to work that into the view definition) Bill On Fri, 01 Nov 2002 16:22:08 -0500, J BLAUSTEIN wrote: >I am trying to update a column from another table sum without using a view - >I used: >update stmtbill set col1= (sum(ar)) from stmtbill t1, stmtdet t2 where >t1.famno = t2.famno + > and invdate > (.#date -30) >any help would be appreciated ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
