Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we...

8
Activity 3 Creating queries with more user- defined criteria in the Design View In this activity, we are going to create several queries with more user-defined criteria. 1.Start Microsoft Access and open the database file ch11_01.mdb in the hard disk. 2.Click ‘Queries’ in the ‘Objects’ column and then click . New

Transcript of Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we...

Page 1: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

Activity 3

Creating queries with more user-defined criteria in the Design ViewIn this activity, we are going to create several queries with more user-defined criteria.

1. Start Microsoft Access and open the database file ch11_01.mdb in the hard disk.

2. Click ‘Queries’ in the ‘Objects’ column and then click .

New

Page 2: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

3. Double-click ‘Design View’ in the ‘New Query’ dialogue box.

4. Double-click ‘CPU’ in the ‘Show Table’ dialogue box to add the table into the Design View window. Then, click to continue.

Close

Activity 3

Creating queries with more user-defined criteria in the Design View

Page 3: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

5. Add the fields to the Design View window as shown below.

6. Enter ‘<1100’ into the criteria box of the ‘Price’ field.

Activity 3

Creating queries with more user-defined criteria in the Design View

Page 4: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

7. Select ‘Ascending’ as the sorting criterion for the ‘Price’ field.

8. Select ‘Queries’ ‘Run’ to execute the query. Alternatively, click the ‘Run’ button on the toolbar.(a) How many records are shown in the query window?

_________________________________________________(b) Which is the most expensive product? How much is it?

_________________________________________________

Activity 3

Creating queries with more user-defined criteria in the Design View

14 records.

Intel P4D 925 (3,000 MHz). It costs $1,058.

Page 5: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

9. Close the query window. Try to create a query for each of the questions listed below.(a) Display all fields in Motherboard and those

motherboards with Price less than or equal to 1100. Sorting is not required.

(b) Display RAM Brands, Product Names (field ‘Product’), Sizes and Prices that those Spec is ‘DDRRAM’ and Size is ‘1024MB’. Arrange the records in descending order of Prices.

(c) Display CPU Product Names that start with ‘CELERON’. Arrange the records in ascending order of Product Names.

Activity 3

Creating queries with more user-defined criteria in the Design View

Page 6: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

9. Complete the following table to show the results of your queries.

Activity 3

Creating queries with more user-defined criteria in the Design View

Selected field(s)

From table(s)

Criteria Sort by field(s)

(a)

(b)

(c)

Brand, Socket, Price, Product

Motherboard Price: <= 1100

None

Brand, Product, Size, Price

RAM Spec: Like ‘DDR-RAM’Size: =1024

Price (descending)

Product CPU Product Name:Like ‘Celeron*’

Product(ascending)

Page 7: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

10. Close the database file and exit Microsoft Access.

Activity 3

Creating queries with more user-defined criteria in the Design View

Page 8: Activity 3 Creating queries with more user-defined criteria in the Design View In this activity, we are going to create several queries with more user-defined.

10. Close the database file and exit Microsoft Access.

Activity 3

Creating queries with more user-defined criteria in the Design View