I want to update invoiceline records based on a value in the associated customer table. I've searched the forum but am unable to see if the following SQL statement is possible
"update invoiceline set invoiceline.customfieldhotelchain = customer.customfieldhotelchain from customer inner join invoiceline on customer.name = invoiceline.customerreffullname where memo is null or memo <> 'conversion' ". I received the error message "Unexpected extra token: from".
I've seen elsewhere in the forum one should not put the table identifier before the updated fieldname so I've tried the following statement without the table prefix (eg. "update invoiceline set customfieldhotelchain...") but with no success.
Also, I've tried the following format and different variations "update invoiceline set customfieldhotelchain = customer.customfieldhotelchain from {OJ invoiceline inner join customer on (invoiceline.customerreffullname = customer.name)} where memo is null or memo <> 'conversion' " but I receive the message "Unexpected extra token: from". I can make this format display the correct records when it is a SELECT statement.
Any ideas as how to accomplish this update? |