access courses - update queries acting only
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

resolvedResolved · Low Priority · Version Standard

replyReply Wed 20 Jun 2007, 15:24Delegate Ricardo said...

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

For upcoming training course dates see: Pricing & availability

replyReply Thu 28 Jun 2007, 14:17Trainer David said...

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

replyReply Mon 16 Jul 2007, 10:55Delegate Ricardo said...

RE: Update Queries acting on only part of a table

That's great - thankyou David

 

Access tip:

Design View in Relationship window

Your in the Relationship window and changes are required to be made to a Table's design.

Rather than exiting the Relationship window, if you perform a right-mouse click on the table, it opens that table up in Design view

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard