Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle update not properly ended.

Status
Not open for further replies.

Wilsond3010

Programmer
Jan 23, 2001
4
GB

Can anyone spot what is wrong with this bit of code.

update license_list
set license_list.license_type = productmap.license_type
from license_list, productmap
where product_name = tivoli_product_name
and netc_version = tivoli_version

I keep getting sql command not properly ended.
 
I think you are combining features of a select statement with your update, specifically your "from" clause. You have already specified which table you are updating, so the from clause shouldn't be part of your update statement.

Try using a subquery instead. Something like the following should work, assuming tivoli_product_name and tivoli_version form a unique key for your productmap table.

update license_list
set license_list.license_type =
(select productmap.license_type
from productmap
where product_name = tivoli_product_name
and netc_version = tivoli_version)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top