Sql

hewstone999

Registered User.
Local time
Today, 10:46
Joined
Feb 27, 2008
Messages
37
I have this update SQL query(See below). Tho it keep saying "Operation must use an updateable query". Any ideas on wats wrong with the code? Thanks

UPDATE TEST_DOC SET TEST_DOC.DataSet = (Select IFF_Descriptions.DataSet FROM IFF_Descriptions WHERE IFF_Descriptions.Field1 = "MPI_CORE_IFF")
WHERE TableName="MPI_CORE_IFF";
 
You have a table named "TEST_DOC" with a field called "TableName", right?

If so, you might want to look at your sub-query. You are trying to set multiple single rows to, potentially, multiple rows. If SQL believes the subquery might return more than one row, it will give you an error. You could try limiting the subquery with "top 1" or an aggregate function that will force it to only return one row.
 
Simple Software Solutions

What jumps out a me is that you have used the word WHERE twice instead of using WHERE ... AND ...

CodeMaster:
 

Users who are viewing this thread

Back
Top Bottom