try

update A set rate = ( select B.rate from B where A.row_id = B.row_id and A.rate != B.rate )

hope this helps

Detlef

 

----- Original Message -----
Sent: Thursday, February 13, 2003 4:37 PM
Subject: Help with an update statement


I have two tables  A and B

table A   with 2 columns row_id , rate

e.g of contents
table A:
row_id                rate
1                1.3
2                1.6


table B with same columns
e.g of contents
table B:
row_id                rate
1                2.0
2                2.3


I want to update A.rate with the value from table B with the row_id matching up so I want results like this
table A:
row_id        rate
1        2.0
2        2.3


this is my update query
update A
set A.rate = ( select B.rate
from  B
where A.row_id = B.row_id
and A.rate != B.rate )

I am getting error Missing Delimiter

Does anyone know if my update statement is correct or I should use something else?

I appreciate your time



Pearl Pin Harry
Senior Software Engineer
Radcliffe Datahorse Inc.
105 Commerce Valley Drive West, Suite 510
Markham, Ontario L3T 7W3
Tel: 905.771.5400 ext 336
Fax: 905.771.6604
www.radcliffedatahorse.com

Reply via email to