Download presentation
Presentation is loading. Please wait.
Published byHope Carr Modified over 9 years ago
1
Management Information Systems Introduction to Databases Lab Dr. Shankar Sundaresan
2
2 MicroSoft Access l Go to the course web site l Right click on the stocks database link l Save it as YourLastNameStocksClassWork l We will create queries and save it in the database.
3
3 MicroSoft Access l QBE Grid (Query By Example) l Create Query in Design Wizard l Add necessary tables l Fill out the grid with l required fields from various tables l displayed fields l necessary filter conditions (criteria) l sorting l Run Query l Save Query l View Results (datasheet view)
4
4 Agenda l Finding and Displaying Information l simple queries l logical operators l logical connectors l data from multiple tables l Creating Tables / Entering data l Update / Deletion
5
5 SQL in Microsoft Access l View or Modify an SQL statement l Create query or open existing one l From View Menu, choose SQL (SQL view button) l Change the SQL statement l Choose run or datasheet to see results l Creating SQL-specific Queries l Choose new query / existing query l Choose SQL specific from Queries menu
6
6 Finding and Displaying Information l Display all details of all customers l Display all stock details l Display name, gender and birthdate of all customers (demographics data) l Display ticker, company name and price of all stocks
7
7 Finding and Displaying Information l Display all customers in Boston l Display all hardware industry stocks l Display name and city for male customers l Display ticker, and name for stocks traded in AMEX
8
8 Multiple Conditions l AND l OR l NOT l Display Boston customers older than 40 l Display NYSE stocks with beta exceeding 1
9
9 Multiple Conditions l Display software stocks with eps exceeding 20 cents l Display software and hardware stocks with eps exceeding 20 cents l Display software and hardware stocks with eps exceeding 20 cents with a postive dividend l Display non-retail stocks with beta exceeding 1
10
10 Using Logical Operators l = l >, >= l <, <= l BETWEEN... AND l LIKE l IS NULL l IN l ANY
11
11 Using Logical Operators l Display all stocks with beta in the range 0.8 to 1.2 l Display all stocks with beta in the range 0.8 to 1.2 and eps exceeding 20 cents l Display all details of Dell Computer l Display all details of stocks that start with the letter D
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.