Add a field in an update query

G

Guest

Hello
I currently have a table that I can describe as follows to keep it simple

There are two fields, one for region (text field) and the other for sales (number field). I would like to assign a "Tier" to each region based on the amount of sales and have this be in a new field called Tier

So if you sell more than $500k you are in Tier 1, $100k-500K Tier 2, and below $100k Tier 3

How can I set up a query to update my current table to add this field named Tier and assign the tiers correctly based on Sales? Thanks!
 
P

prabha

Hi,

- Add the Field "Tier" to your table

- Create an UPDATE Query that has "Tier" being the only field updated like

Field: Sales Tier
UpdateTo: IIf([sales]>500,"Tier
1",IIf([sales]<100,"Tier 3","Tier 2"))

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."


--------------------
| Thread-Topic: Add a field in an update query
| thread-index: AcP2WI06kCA5mC1aR7+dGCH1DJxrDQ==
| X-Tomcat-NG: microsoft.public.access.queries
| From: =?Utf-8?B?ZXhjZWxfZ3V5?= <[email protected]>
| Subject: Add a field in an update query
| Date: Wed, 18 Feb 2004 11:51:08 -0800
| Lines: 8
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.queries
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.queries:190355
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.access.queries
|
| Hello,
I currently have a table that I can describe as follows to keep it simple:

There are two fields, one for region (text field) and the other for sales
(number field). I would like to assign a "Tier" to each region based on
the amount of sales and have this be in a new field called Tier.

So if you sell more than $500k you are in Tier 1, $100k-500K Tier 2, and
below $100k Tier 3.

How can I set up a query to update my current table to add this field named
Tier and assign the tiers correctly based on Sales? Thanks!
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top