By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,481 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,481 IT Pros & Developers. It's quick & easy.

ms access update problem

P: 3
I'm trying to update a table (67024_G03_03012004 ) by matching on the name column in another table (blanks) field. These columns are the same. I can't get it to work.
Any help would be appreciated ! Here is my SQL:


UPDATE 67024_G03_03012004
SET 67024_G03_03012004.Student_OEN = (select [blanks].[oen_number]
from [blanks]
where
[67024_G03_03012004].[StudentName]=[Blanks].[StudentName]);
May 30 '07 #1
Share this Question
Share on Google+
6 Replies

Rabbit
Expert Mod 10K+
P: 12,441
What error are you getting? What results are you getting?
May 30 '07 #2

P: 3
What error are you getting? What results are you getting?
It first asks me for input parameters (which I wasn't expecting) but when I put in a value the error message says 'operation must be an updateable query'.
May 30 '07 #3

Rabbit
Expert Mod 10K+
P: 12,441
It first asks me for input parameters (which I wasn't expecting) but when I put in a value the error message says 'operation must be an updateable query'.
What parameter is it asking you to define?

Usually a parameter when you don't expect one means you've mispelled a table name or field name.
May 30 '07 #4

P: 3
What parameter is it asking you to define?

Usually a parameter when you don't expect one means you've mispelled a table name or field name.
Currently, I just need to know if the syntax of the update command is correct ?
This would help greatly.
May 31 '07 #5

Expert 100+
P: 102
I'm trying to update a table (67024_G03_03012004 ) by matching on the name column in another table (blanks) field. These columns are the same. I can't get it to work.
Any help would be appreciated ! Here is my SQL:


UPDATE 67024_G03_03012004
SET 67024_G03_03012004.Student_OEN = (select [blanks].[oen_number]
from [blanks]
where
[67024_G03_03012004].[StudentName]=[Blanks].[StudentName]);
Hi,
The syntax of UPDATE seems to be correct but make sure that the sub-query returns only one row.

Pradeep
May 31 '07 #6

MMcCarthy
Expert Mod 10K+
P: 14,534
I would actually change it as follows:

Expand|Select|Wrap|Line Numbers
  1.  
  2. UPDATE 67024_G03_03012004 INNER JOIN [Blanks] 
  3. ON [67024_G03_03012004].[StudentName]=[Blanks].[StudentName]
  4. SET 67024_G03_03012004.Student_OEN = [blanks].[oen_number]
  5.  
Jun 1 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.