Quote:
Originally posted by maddog260013
HI all,
I need to update a table from data in a view. I am using version 6.1.
UPDATE shipto INNER JOIN discounts ON shipto.strfnbr=discounts.strfnbr SET stfield2 = discounts.(char(stdiscprice)) WHERE shipto.stfield2 is null
I get:
SQL0104N An unexpected token "UPDATE shipto INNER" was found following
"BEGIN-OF-STATEMENT".
|
I think this should work:
update shipto
set stfield2 = (
select char(stdisprice) from discounts
where discounts.strfnbr=shipto.strfnbr
)
where stfield2 is null