Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

access courses - update queries acting only

Forum home » Delegate support and help forum » Microsoft Access Training and help » access courses - Update Queries acting on only part of a table

access courses - Update Queries acting on only part of a table

ResolvedVersion Standard

Ricardo has attended:
Access VBA course
Access Advanced course

Update Queries acting on only part of a table

Hi

I have a large-ish table (call it [tbl_accounting] ), with say 9 fields, the primary key being clientname.

I have recently receieved information in an excel spreadsheet such that I can update one of those fields (the "fees" field).

The excel information is in 2 columns - one is the clientname, and the other column contains fees.

I'm sorry if this is a silly question, but how would you run an update query to update only those records who have fee information in the excel spreadsheet, and leave the other fields & records alone?

I imported the excel spreadsheet as a new table (say [tbl_feeimport] making clientname the primary key) and tried to run an update query from that, but it didn't work. I'm sure this can be done via SQL or maybe via the Access update queries, but I'm afraid I'm not sure fully how- any help would be gratefully accepted!

Thanks

Ricardo

RE: Update Queries acting on only part of a table

Hi Ricardo,

The sql you would need is:

UPDATE table_name
SET column_1 = new_value
column_2 = new_value
column_3 = new_value
WHERE primary_key = primary_key_value

Hope this helps

David

RE: Update Queries acting on only part of a table

That's great - thankyou David

Access tip:

Space marks

It is good practice not i to have space marks for field names as this can lead to problems when using queries or VBA code. It is much better to use an underscore charcter to represent spaces in field names

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.