J, I hope that I can actually help someone and that my input is valid/correct. It is my understanding that you need to put the alias "t2" in the assigned value portion of the SET phrase, in this case (SUM(t2.ar)) - I am assuming that COLUMN "ar" is found in TABLE stmtdet, or "t2". I am also assuming that invdate is found in TABLE stmtbill, or "t1", so it's been added to that portion of the WHERE-clause. If my assumptions here are incorrect, just modify the statement as you need and see if it works.
Also, it was missing from UPDATE + stmtbill + SET + col1 = (SUM(t2.ar)) FROM + stmtbill t1, + stmtdet t2 + WHERE + t1.famno = t2.famno + AND t1.invdate > (.#date - 30) HTH, Steve in Memphis ----- Original Message ----- From: "J BLAUSTEIN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 01, 2002 3:22 PM Subject: UPDATE SUM FROM ANOTHER TABLE > 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 > J > > ================================================ > 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/ ================================================ 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/
