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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update stmt with select in the set part

Status
Not open for further replies.

mveera

Programmer
Nov 6, 2002
81
US
Hi ,

I am having an update statement with the value to be updated is obtained using a select stmt as shown below.

UPDATE employee SET cmpny = (SELECT distinct cmpny FROM company_detail WHERE COUNTRY_NAME = 'Albania')
WHERE COUNTRY_NAME = 'Albania'

When i try to execute the stmt in Access i get the following error

"Operation must use an updateable query"

I am not sure whether Access doesn't support r there is some problem with the stmt.

Thanks
Veera
 
I think your SQL statement is your problem (I could be wrong). Normally, the Select part is in the WHERE clause.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top