I have not run into that problem lately if the second table is indexed.

Dennis

________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Downall
Sent: Thursday, December 04, 2008 11:19 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Update command question

Dennis,

That's interesting. Once upon a time, you had to have the table that was being 
updated list first, in the list of tables after FROM, or the update could have 
unexpected results.

Bill
On Thu, Dec 4, 2008 at 12:16 PM, Dennis McGrath <[EMAIL 
PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:

Also, put the view first in the list and make sure bunktable.mo_number is 
indexed, even if it is a temp table.

Putting the view first makes the query much faster.



Dennis McGrath



________________________________

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>] On Behalf Of Bill Downall
Sent: Thursday, December 04, 2008 11:14 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Update command question



Bob,



It looks like your datatypes don't quite match. You could try ((1.0 * 
t1.sevenft) + t2.Mo_Qty)



Bill

On Thu, Dec 4, 2008 at 12:11 PM, Bill Downall <[EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]>> wrote:

Bob,



Do you get what you expect when you do this:



SELECT t1.sevenft, t2.Mo_Qty, (t1.sevenft + t2.Mo_Qty) +

  FROM bunktable t1, totals_view t2  +

  WHERE t1.mo_number = t2.mo_number

Bill





On Thu, Dec 4, 2008 at 12:04 PM, <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> 
wrote:

R>update bunktable set sevenft = (t1.sevenft + t2.Mo_Qty) from bunktable t1, 
totals_view t2 where t1.mo_number = t2.mo_number
 Columns have been updated in 1 row(s) in BunkTable







Reply via email to