Select in update [message #18359] |
Tue, 29 January 2002 08:41 |
Tarun bhagwan
Messages: 1 Registered: January 2002
|
Junior Member |
|
|
How do I do an select in update.
THe query
UPDATE vrts_drs_order_header h
SET h.account_id = a.account_id
FROM account_profile a
WHERE h.customer_id = a.customer_id
fails with the error --
FROM ACCOUNT_PROFILE WHERE
*
vrts_drs_order_header.customer_id =ACCOUNT_PROFILE.customer_id
This means that the query is syntatically wrong ... SQL is not expecting a from clause there. Isn't the following the update syntax defn.
UPDATE [[ ONLY ]] table SET col = expression [[, ...]] [[ FROM fromlist ]] [[ WHERE condition ]]
Please help.
regards
Tarun
|
|
|
|