Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a table, and I want to set all the cells in the row "State_Abbr" = "MN" How can I do this?

share|improve this question
    
Is "State_Abbr" the field name or a value in a field? Becuase if it is a value and you went to update all the cells then the value "State_abbr" would be overwritten. If this is not the case, then see my answer. –  Robert Leckie Oct 8 '10 at 21:50

1 Answer 1

up vote 1 down vote accepted

State_Abbr sounds like a field name. If that is the case then you will just need to do a simple sql update. You should be able to go into the query editor, switch to sql and then type in what is below. Remember to replace the section in brackets with your table name.

update [table name here] set state_abbr = "MN" where (state_abbr is null or state_abbr is not null)
share|improve this answer
    
What is the point of that where (state_abbr is null or state_abbr is not null) clause? It's extraneous. –  ta.speot.is Oct 9 '10 at 0:41
    
I haven't used access in a long time and I couldn't remember if you left a where clause off did it match every record or threw an error so I put something in that would match everything. –  Robert Leckie Oct 9 '10 at 1:46
    
your memory of how Access worked when you used it in the past is faulty. Access has never worked that way. –  David W. Fenton Oct 9 '10 at 2:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.