Thank you Razzak, Your example using a view and an update produces the desired results and is the method that Albert recommended also. It doesn't look like I can accomplish the task with a single update command. John
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak Memon Sent: Sunday, September 12, 2010 11:17 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Update command At 09:28 PM 9/12/2010, John Engwer wrote: >Razzak.. I tried to use the syntax that you provided and I receive a >2511 error (Illegal Select). I am using the latest version of V8.. Is >it possible that the syntax only works with V9? John, Let's try the following examples and see what you get. -- CorrelationalUpdate.RMD -- A. Razzak Memon -- September 12, 2010 -- R:BASE 7.6 for Windows IF (CVAL('DATABASE')) <> 'RRBYW14' OR (CVAL('DATABASE')) IS NULL THEN CONNECT RRBYW14 IDENTIFIED BY NONE ENDIF CLS SET ERROR MESSAGE 677 OFF DROP VIEW tDetail_Totals SET ERROR MESSAGE 677 ON CREATE TEMPORARY VIEW `tDetail_Totals` + (`TransID`,`Tot_ExtPrice`) + AS SELECT TransID,(SUM(ExtPrice)) + FROM InvoiceDetail GROUP BY TransID COMMENT ON VIEW `tDetail_Totals` IS 'Temporary View to get totals' SET FEEDBACK ON UPDATE InvoiceHeader SET NetAmount = Tot_ExtPrice + FROM tDetail_Totals,InvoiceHeader + WHERE InvoiceHeader.TransID = tDetail_Totals.TransID SET FEEDBACK OFF CLS RETURN -- CorrelationalUpdate.RMD -- A. Razzak Memon -- September 12, 2010 -- R:BASE Turbo V-8 for Windows IF (CVAL('DATABASE')) <> 'RRBYW15' OR (CVAL('DATABASE')) IS NULL THEN CONNECT RRBYW15 IDENTIFIED BY NONE ENDIF CLS SET ERROR MESSAGE 677 OFF DROP VIEW tDetail_Totals SET ERROR MESSAGE 677 ON CREATE TEMPORARY VIEW `tDetail_Totals` + (`TransID`,`Tot_ExtPrice`) + AS SELECT TransID,(SUM(ExtPrice)) + FROM InvoiceDetail GROUP BY TransID COMMENT ON VIEW `tDetail_Totals` IS 'Temporary View to get totals' SET FEEDBACK ON UPDATE InvoiceHeader SET NetAmount = Tot_ExtPrice + FROM tDetail_Totals,InvoiceHeader + WHERE InvoiceHeader.TransID = tDetail_Totals.TransID SET FEEDBACK OFF CLS RETURN -- CorrelationalUpdate.RMD -- A. Razzak Memon -- September 12, 2010 -- R:BASE eXtreme 9.0 (32/64) IF (CVAL('DATABASE')) <> 'RRBYW16' OR (CVAL('DATABASE')) IS NULL THEN CONNECT RRBYW16 IDENTIFIED BY NONE ENDIF CLS SET ERROR MESSAGE 677 OFF DROP VIEW tDetail_Totals SET ERROR MESSAGE 677 ON CREATE TEMPORARY VIEW `tDetail_Totals` + (`TransID`,`Tot_ExtPrice`) + AS SELECT TransID,(SUM(ExtPrice)) + FROM InvoiceDetail GROUP BY TransID COMMENT ON VIEW `tDetail_Totals` IS 'Temporary View to get totals' SET FEEDBACK ON UPDATE InvoiceHeader SET NetAmount = Tot_ExtPrice + FROM tDetail_Totals,InvoiceHeader + WHERE InvoiceHeader.TransID = tDetail_Totals.TransID SET FEEDBACK OFF CLS RETURN Have fun! Very Best R:egards, Razzak. --- RBASE-L ================================================ TO POST A MESSAGE TO ALL MEMBERS: Send a plain text email to [email protected] (Don't use any of these words as your Subject: INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH, REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP) ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: INTRO ================================================ TO UNSUBSCRIBE: Send a plain text email to [email protected] In the message SUBJECT, put just one word: UNSUBSCRIBE ================================================ TO SEARCH ARCHIVES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: SEARCH-n (where n is the number of days). In the message body, place any text to search for. ================================================

