Update Table

Dear Experts

I need to find the most efficient way of updating records on mass.  What I am trying to achieve is to update records in a table that meet a certain criteria. The table is linked to a sharepoint 2010 list (but this shouldn't make any difference (I hope))

The fields involved are as follows:

Table = “Newsletter”

Field to update =  “Uploaded” (a Yes/No field)

Criteria Field = “Story Type” (Text) - where <> “The Ending”

So the statement would be to mark “Uploaded” as Yes except if Story Type = “The Ending”

The table will grow on average by 2,000 records a year, but each time this code is run there is likely to only be 30-40 records that need updating.

Can anybody help?
correlateAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peter57rCommented:
The query would just be..

Update Newsletter set Uploaded = True where [story type] <>"The ending" and Uploaded =false

'Efficiency'  would be a case of indexing the [Story Type] field (but NOT the Uploaded field)

I am assuming that Story type cannot change from 'The ending' to something else and that Uploaded must be either True or False.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ukerandiCommented:
You can use below code

Go to MS Access Design View - > SQL View
Paste below code


UPDATE Newsletter SET Uploaded=“Y” where [Story Type] <>"The Ending"

Open in new window

ukerandiCommented:
code syntax
Syntax 

UPDATE [Tablename] SET Fieldname=“Y” where [Fieldname] criteria

then should be

UPDATE Newsletter SET Uploaded=“Y” where [Story Type] <>"The Ending"

Open in new window

correlateAuthor Commented:
brilliant - thank you for that
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.