PC Review


Reply
Thread Tools Rate Thread

Access 2007 - Update Query

 
 
New Member
Join Date: Jun 2011
Posts: 15
 
      22nd Jul 2011
Can you do a multiple update with multiple criteria in an update query?

I am trying to update a field in a table that will have different values depending on the two criteria filters IE If a vehicle type = Car and the Post Zone = SO update the Rate field to £1.15. If the vehicle type = MPV and the Post Zone = SO update the Rate field to £1.20 etc etc. Different Post Zones will have different Rates so there will be about 8 different rates.
 
Reply With Quote
 
 
 
 
Banned
Join Date: Jul 2011
Posts: 16
 
      22nd Jul 2011
  1. Create a separate table with the Postal Zone and Rate Fields.
  2. Create all 8 records with the Postal Zone Code and Rate values.
  3. Create an Update Query with main Table along with the newly created Rate Table and link both tables on Postal Zone Code.

Sample SQL is given below:

Code:
UPDATE Table1 INNER JOIN Table2 ON Table1.PostalCod = Table2.PostalCod SET  Table1.Rate = [NewRate];
You may have several records of the same Postal Zone Code in the Main Table. All of them will be updated with the same Rate.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a pivot table in Excel 2007 from a QUERY in Access 2007 Neurogenesis Microsoft Excel Discussion 6 12th May 2011 11:25 AM
Access 2007-Update Query ider Microsoft Access Queries 1 22nd Feb 2010 01:09 AM
Access 2007 / update query Abay Microsoft Access Queries 1 20th May 2009 04:52 AM
Access 2007 Update query not behaving GE2V Microsoft Access Queries 1 12th Aug 2008 07:04 AM
Access 2007 update queries does not update table in SQL Server 200 =?Utf-8?B?S2h1emVtYQ==?= Microsoft Access Forms 1 3rd Jul 2007 04:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:00 PM.