Querying Databases A query is a program that allows us to VIEW the data or operate on the data Several types of queries –Select query –Merge query –Summary.

Slides:



Advertisements
Similar presentations
Database Design Week 10.
Advertisements

Microsoft ® Access ® 2010 Training Create queries for a new database.
Microsoft® Office Access® 2007 Training
Tutorial 3 Queries and Table Relationships
Access Custom Forms & Reports. Topics  Designer Skills  Tab Order (Forms)  Copying Properties  Adding a Control  Adding Page Breaks  Adding Tab.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – Querying a Database.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Querying a Database Using the Select Query Window
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Querying a Database Microsoft Office Access 2003.
Build a database IV: Create queries for a new Access database Overview: Ask your data — create queries It’s time to create queries, one of the most powerful.
Chapter 2 Querying a Database
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® Access 2010 © 2011 The McGraw-Hill Companies,
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
DAY 16: ACCESS CHAPTER 2 Tazin Afrin October 10,
WEEK 11 Database Design. Agenda Hybrid Review Create Tables Add, Edit Data Create Relationships in MS Access 2010 Queries.
Copyright 2007, Paradigm Publishing Inc. BACKNEXTEND 3-1 LINKS TO OBJECTIVES Save a Filter as a Query Save a Filter as a Query Parameter Query Inner, Left,
1 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Lesson 31: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Design.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access Committed to Shaping the Next Generation.
Microsoft Access Intro Class 5 Working with Queries.
Exam Review – Queries & MORE! Access SimNet Exam Access Case Exam Final Exam.
Queries. What is a query? A query is actually the name for any database manipulation operation. The most commonly used type is a select query, which is.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 6 – Designing.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
 Agenda 2/20/13 o Review quiz, answer questions o Review database design exercises from 2/13 o Create relationships through “Lookup tables” o Discuss.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T7 PROBLEM SOLVING USING ACCESS.
Performing Calculations—1 of 2 In addition to using queries to retrieve, update, sort, and filter data in a database, you can use a query to perform calculations.
1 Database Systems Introduction to Microsoft Access Part 2.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Access Forms and Queries. Entering Data in Your Table  You can add data to your table in Datasheet view, by typing in the columns and rows.  This.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
1 After completing this lesson, you will be able to: Create and run a query. Specify criteria in a query. Create a calculated field. Create a multiple-table.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
Microsoft Office 2003: Advanced 1 ADVANCED MICROSOFT ACCESS Lesson 10 – Analyzing Data.
ACCESS (CHAPTER 2-3 continued) Naman Kohli October 16,
1 Chapter 3: Customize, Analyze, and Summarize Query Data Exploring Microsoft Office Access 2007.
Microsoft Office 2013: In Practice Chapter 3 Creating and Using Queries Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Build a database V: Create forms for a new Access database Overview: A window into your data So far in this series of courses, you’ve built tables, relationships,
T7-1 LEARNING OUTCOMES – ACCESS PROBLEM SOLVING 1.Describe the process of using the Simple Query Wizard using Access 2.Describe the process of using the.
MS-Access XP Lesson 4. Modifying Queries 1.Select query in queries 2.Click design button or Right click on query and click design view 3.Change query.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Microsoft Access 2000 Presentation 5 Creating Databases Part IV (Creating Queries)
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Creating Advanced Queries and Enhancing Table Design.
Microsoft Access 2013 Bobby Wan.
Microsoft Office Illustrated Introductory, Windows Vista Edition
Larry Reaves October 9, 2013 Day 16: Access Chapter 2 Larry Reaves October 9, 2013.
Microsoft Office Illustrated Fundamentals
Access Maintaining and Querying a Database
Microsoft Access 2003 Illustrated Complete
Microsoft Office Access 2003
Tutorial 3 – Querying a Database
Exploring Microsoft Access 2003
Microsoft Office Access 2003
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access Review.
Spreadsheets, Modelling & Databases
Microsoft Office Illustrated Introductory, Windows XP Edition
Tutorial 5 Advanced Queries and Enhanced Table Design
Presentation transcript:

Querying Databases A query is a program that allows us to VIEW the data or operate on the data Several types of queries –Select query –Merge query –Summary query –Crosstab query –Action query

Simple Select Query Go into query wizard –select table (or other query) where data reside –select desired fields –Next, then make sure button is on detail –Next, then name query –Finish – can open in design or datasheet view

Simple Select Query In design view, you can –Change order of fields by dragging –sort data by selected fields –decide which fields to show –assign criteria to select records type in value –numbers can just be entered –text needs to be enclosed in double quotes –dates need to be enclosed by # can build simple expressions –between, <>

Simple Select Query Use expression builder Example – select species =7 add length>100

Expression Builder Adds ability to create new variables, select by criteria Mathematical and Logical Operators –add, subtract, multiply, divide –=, >, not equal –And, Or, Not, –Like – string operator can use wildcards *, ?

Expression Builder And, Or, Not Logic –And: both or all conditions need to be true –Or: one or both conditions need to be true –Not: the expression must be false to be selected

Expression Builder Lots of functions available – thus can build up almost any formula you can imagine to create CALCULATED FIELDS We won’t go much into this – very specific for situation you are dealing with –Short example, converting length in mm to length in inches Go into field name and hit expression builder Put in field name followed by colon, then enter formula. Note – for some reason, Access will try to put in >, but this needs to be deleted

Select Query from Multiple Tables This is what I call a MERGE query Important note: if tables have not been connected in relationship window, you WILL run into problems. This will create a new table with every record in both tables being combined –Query Wizard won’t let you do this, but design view will Start in Query Wizard Basically looks the same as select query from a single table (except note that tables will show as linked in window in design view)

Select Query from Multiple Tables If you’ve properly defined relationships, performing merges is simple in Access. This is a good way to “test” your table relationships because if it is not properly defined, the merge will give you “incorrect” results