Hi, Dan - make sure you specify the tables in the correct order.  table1 has
to be where the values you are looking for are found.

Update CustMessages SET CustName = CustName +
  FROM Customers t1, CustMessages t2 +
  WHERE t1.CustNo = t2.CustNo

If you write

Update CustMessages SET CustName = CustName +
 FROM CustMessages t1, Customers t2 +
 WHERE t1.CustNo = t2.CustNo

it won't work

Alternately, you can specify the table aliases

Update CustMessages SET CustName = t2.CustName +
  FROM CustMessages t1, Customers t2 +
  WHERE t1.CustNo = t2.CustNo

----- Original Message -----
From: Dan Weissmann <[EMAIL PROTECTED]>
To: RBase List Server <[EMAIL PROTECTED]>
Sent: Wednesday, May 30, 2001 5:38 PM
Subject: What's wrong with this clause?


> Hi all.
>
> I'm trying to update a column in table one with the values in table 2.
Seems
> simple, but nothing is being updated. What am I missing?
>
> UPDATE <table1> SET <column1> = <column1> FROM <table1> T1, <table2> T2
> WHERE T1.Columnx = T2.columnx
>
> There are values in <table2.column1.> but no values in <table1.column1>.
> After the UPDATE is run, there are still no values in <table1.column1>
>
> Thanks,
>
> Dan
>

Reply via email to