Bob, One more try before you move on to other things? Try it without the table alias for the table you are updating:
update bunktable set sevenft = (t1.sevenft + t2.Mo_Qty) from bunktable, totals_view t2 where bunktable.mo_number = t2.mo_number Bill On Thu, Dec 4, 2008 at 2:09 PM, <[EMAIL PROTECTED]> wrote: > Thanks Dennis, > I tried an index on Mo_Number and placing the table order as you have it > below. > Niether option worked. (This is still a 7.5 version system) I do get the > > "Columns have been updated" verification response, but the column does not > change. > > Oh well, on to other things. > > -Bob > > -- > Thompson Technology Consultants > LaPorte, IN 46350 > 219-363-7441 > > > -------------- Original message -------------- > From: Dennis McGrath <[EMAIL PROTECTED]> > > What I am saying is use this statement, it puts the view first. > > > > update bunktable set sevenft = (t1.sevenft + t2.Mo_Qty) from totals_view > t2, bunktable t1 totals_view t2 where t1.mo_number = t2.mo_number > > > ------------------------------ > > *From:* [email protected] [mailto:[EMAIL PROTECTED] *On Behalf Of * > [EMAIL PROTECTED] > *Sent:* Thursday, December 04, 2008 12:32 PM > > *To:* RBASE-L Mailing List > *Subject:* [RBASE-L] - Re: Update command question > > > > Dennis, > > The second table in the statement is actually a single table view that > sums the MO_Qty column. > > I do not have an index on the table. I will give this a try later in the > day. > > > > Thanks! > > -Bob > > > > -- > Thompson Technology Consultants > LaPorte, IN 46350 > 219-363-7441 > > > > -------------- Original message -------------- > From: Dennis McGrath <[EMAIL PROTECTED]> > > 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]> > 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] *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]> 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]> 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 > > > > > > > > > >

