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