G'day Kyle,

At 15:23 23/09/02 -0500, you wrote:
>Could one of you rbase gurus help me??

Since the gurus haven't answered yet...

>Can a field in a table be set to an expression based on the following:
>Sum of a field plus sum of another field from another table

Not with a table, but if the tables have a common column
you could do it with views.

>For example:
>
>Totest.Worder = sum(labest.craft) + sum(matest.craft)

Just break it down like this:

CREATE VIEW +
   (CommonColumnName,col1,col2,col3,SumCol) +
   AS SELECT +
   t1.CommonColumnName,t1.Col1,t1.Col2,t1.Col3,(SUM(Craft)) +
   FROM latest
CREATE VIEW +
   (CommonColumnName,col5,col6,col7,SumCol2) +
   AS SELECT +
   t1.CommonColumnName,t1.Col1,t1.Col2,t1.Col3,(SUM(Craft)) +
   FROM matest
CREATE VIEW +
   (col1,col2,col3,SumCol,col5,col6,col7,SumCol2,SumSums) +
   AS SELECT +
   t1.Col1,t1.Col2,t1.Col3,t1.SumCol, +
   t2.Col1,t2.Col2,t2.Col3,t2.SumCol2, +
   (t1.SumCol + t2.SumCol2) +
   FROM latest t1 +
   LEFT OUTER JOIN matest +
   ON CommonColumnName


Warmest regards,


Tom Grimshaw
coy:    Just For You Software
tel:    612 9552 3311
fax:    612 9566 2164
mobile: 0414 675 903

post:   PO Box 470  Glebe  NSW  2037  Australia
street: 3/66 Wentworth Park Rd  Glebe  NSW  2037

email:  [EMAIL PROTECTED]
web: www.just4usoftware.com.au

"... the control of impulse -- is the first principle of civilization."-- 
Will Durant,
Pulitzer Prize winning philosopher, writer and historian

the most needed product in the world can be found at
www.thewaytohappiness.org

This email and any files transmitted with it are confidential to the 
intended recipient and may be privileged. If you have received this email 
inadvertently or you are not the intended recipient, you may not 
disseminate, distribute, copy or in any way rely on it. Further, you should 
notify the sender immediately and delete the email from your computer. 
Whilst we have taken precautions to alert us to the presence of computer 
viruses, we cannot guarantee that this email and any files transmitted with 
it are free from such viruses.

================================================
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/

Reply via email to