473,322 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Updating multiple records based on criteria with a single statement

What I'm trying to do is set a players division according to their age.
So if age is 8, update division to junior, if age is 9, update division
to medium, if age is 10, update division to pee wee, and etc.

I'm trying to accomplish this in a single query, and be able to run
this query and verify that players are in the right division.

Is it possible to update multiple records in a table with a single
query while having criteria?

Nov 11 '06 #1
1 1950

davidevan wrote:
What I'm trying to do is set a players division according to their age.
So if age is 8, update division to junior, if age is 9, update division
to medium, if age is 10, update division to pee wee, and etc.

I'm trying to accomplish this in a single query, and be able to run
this query and verify that players are in the right division.

Is it possible to update multiple records in a table with a single
query while having criteria?
Sounds like you need a table for (Age, Division). then join the two
tables in your query and you're done. Otherwise, you'd join and then
use the value from the (Age,Division) table is called. Just join the
two tables on the Age field.

Nov 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: M P | last post by:
I need a code that will update multiple records on a list thru checkbox. If the record is selected, the details that was updated on the selected record will copy the same value as what is...
1
by: edhead | last post by:
Access newbie here, I am trying to figure out how to set up a query that will return an average from multiple records all created on the same date. Table has the following fields date, weight1,...
1
by: davidevan | last post by:
I'm trying to update a single field in a table according to the an age category as a condition. The meat of the code that executes looks like this (I created a record set, and loop through it...
2
by: willwmagic | last post by:
Hi everyone, I feel as this is a very simple question, but I cannot find any information pertaining to it. I want to be able to update a set of records that were returned through a select...
2
by: ndeeley | last post by:
Hello, I need to create a command button to print a report in Preview mode using the criteria from a combo box. The combo box is unbound and holds a list of clients. I need the user to select...
5
by: jrodcody | last post by:
Hello: I am trying to create multiple records in a table named tblTravel based on the input of a date range in two form controls. The inputs for the form are LastName, TravelDate, EndDate,...
6
by: Al Moodie | last post by:
Hi, I have a MySQL database where I want to updated multiple records. The table has two columns: product_number product_price I have a list with first entry product_price, second entry...
5
by: Bill Schanks | last post by:
I have a winform app (VB 2005) that allows users to export data to excel, make updates to the excel file and import the data from that Excel file and update the database. My question is: Is it...
8
by: cehlinger | last post by:
I am trying to add multiple records based on a date range. I found some examples and have tried them but am getting errors and I can't seem to figure out what the problem is. I am not a VBA...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.