user2132188
user2132188

Reputation: 177

Update Access database (multiple rows)

I am totally newbie to Access, I used to use Excel to handle my needs for a while.

But by now Excel has become too slow to handle such a big set of data, so I decided to migrate to Access.

Here is my problem

My columns are:

Number  | Link                          | Name      | Status
1899    | htto://example.com/code1      | code1     | Done
2       | htto://example.com/code23455  | code23455 | Done
3       | htto://example.com/code2343   | code2343  | Done
13500   | htto://example.com/code234cv  | code234cv | Deleted
220     | htto://example.com/code234cv  | code234cv | Null
400     | htto://example.com/code234cv  | code234cv | Null

So I want a way to update Status of my rows according to numbers list.

For example I want to update Status column for multiple numbers to become Done

Simply I want to update "Null status" to become "Done" according to this number list

13544
17
13546
12
13548
13549
16000
13551
13552
13553
13554
13555
12500
13557
13558
13559
13560
30
13562
13563

Something like this

I tried "update query" but I don't know how to use criteria to solve this problem

In Excel I did that by "conditional formatting duplicates" -with my number list which I wanted to update-

Then "sort by highlighted color" then "fill copy" the status with the value

I know that Access is different but I hope that there is a way to do this task as Excel did.

Thanks in advance

Upvotes: 0

Views: 151

Answers (1)

Ravi Yenugu
Ravi Yenugu

Reputation: 3898

From my understanding, You can try

Update TblA
Set TblA.Status="Done"
where Number in (13544,17,13546,....)

Or alternatively easy method is to pull these numbers in IN clause into its own table and use it like this

Update TblA 
Set TblA.Status="Done" where Number in (select NumCol from NumTable )

or this solution may help you Here

Upvotes: 2

Related Questions