Purpose
In this assignment, you will practice using a variety of query functionality to include using functions, calculations and parameters. You will also create an action query to update data in a table to demonstrate other ways to manipulate data using queries in Access.
Assignment Instructions
Using the provided sample database, create queries to demonstrate a variety of query functionality using functions, calculations and parameters.
For this assignment you will use this sample database:
IT163_ModelCarSampleDatabase.accdb
Hint:
The SQL code to generate the name of the month looks like this:
Month
Name(Month([SaleDate])) AS [Month]
In the design view, click on “Builder” in the Query Setup group on the Query Tools Design tab on the ribbon to open the expression builder for the date field. Expand the Functions group. Choose Built-in Functions. Select the Date/Time Category and use the MonthName and Month Expression Values.
Hint: In the query design view, click on “Totals” from the Show/Hide group on the Query Tools Design tab on the ribbon.
Reference: Ulrich, L. A. & Cook, K. (2019). Access
019 for dummies. Wiley.
Chapter 15: “Number Crunching with the Total Row”
Chapter 16: “Express Yourself with Formulas / Hooray for Expression Builder”
Your results should show two columns of data like this (partial results for example only – not actual results):
SumOfQuantity |
Description
and RetailPrice fields from the Products table.
SalePrice
” as a third field in your query.
OrigPrice
and reduced price as SalePrice in the query results.
For extra help see Optional Resources for Assignment under the Academic Tools, Library link:
Reference:Calculating Fields in SQL Functions
https://support.microsoft.com/en-us/office/calcula…
Reference: Ulrich, L. A. & Cook, K. (2019). Access 2019 for dummies. Wiley.
Chapter 16: “Express Yourself with Formulas / A Simple Calculation”
Your results should show three columns of data like this (partial results for example only – not actual results):
$25.19 | $27.99 |
Company
name from the Customers table for a given state. Use a parameter to prompt the user to enter a two character state code.
Hint: add the prompt like [Enter a state code] in the criteria for the
State
field
Reference: Ulrich, L. A. & Cook, K. (2019). Access 2019 for dummies. Wiley.
Chapter 16: “Express Yourself with Formulas / Using Parameter Queries to Ask for Help”
Your results might look like this (for a state entered of “
NY
”):
Southwest Softies |
Rockin And Rollin |
World’s Best Toys |
Your Favorite Things |
Grandma’s Closet |
● Create an update query to update the name of the company “Terriffic Toys” in the Customers table to correct the misspelling in their name.
Hint:
Update to: “Terrific Toys”
Criteria: “Terriffic Toys”
Hint: Access will display a warning dialog that “You are about to update 1 row(s).”Click Yes to acknowledge and accept this update.
Reference: Ulrich, L. A. & Cook, K. (2019). Access 2019 for dummies. Wiley.
Chapter 17: “Take Charge with Action Queries / Easy Update”
In a Word document, place the SQL code for each of the four queries above. After the SQL code, place a screenshot of the successful execution from Access showing the correct results were garnered when you ran each query. Start a new page for each query. NOTE: for the update query, you should take a screenshot of the Customers table showing the updated company name for that record since this query will not produce a results set as it is updating the table data not just selecting data.