Presentation is loading. Please wait.

Presentation is loading. Please wait.

MS-ACCESS BY SANGEETHA PARTHASARATHY Topics Covered Understanding different types of Queries Creating a Query Creating a Query using a Wizard Changing.

Similar presentations


Presentation on theme: "MS-ACCESS BY SANGEETHA PARTHASARATHY Topics Covered Understanding different types of Queries Creating a Query Creating a Query using a Wizard Changing."β€” Presentation transcript:

1

2 MS-ACCESS BY SANGEETHA PARTHASARATHY

3 Topics Covered Understanding different types of Queries Creating a Query Creating a Query using a Wizard Changing Fields in a Query Retriving selective records Creating a Query to summarize values Display a query in design view

4 Understanding different types of Queries Select Query :This retrives and displays records in the Table window in Datasheet View. Crosstab Query : This displays summarized values(sums,count,average) from one field in a table and groups them by one set of fields in the left side of datasheet and another set of fields listed across the top of the datasheet. Action Query:`This performs operations that match the criteria. Cont

5 Action Queries : There are four kinds of queries. (I) Delete Queries-Delete matching records from atable (ii) Update Queries-Make changes to matching records in a table (iii) Append Queries-Add new records to the end of the table (records not matching your criteria are added to the table) (iv) Make- Table Queries - Create new tables based on matching records. Parameter Query: Allows you to prompt for a single piece of information to use as selection criteria in the query. For example: To find customer information in each state, we could enter state as a parameter to retrieve the records.

6 Creating a Query In the Database Window,click Queries tab,and then Click New. In the New Query Dialog box,click Design view,and then click OK. Select the table or Query containing the records you want to retrieve. Click Add. Click Close to display the query in Design view. In the field list at the top part of the design view window,double-click each field you want to include. In the Design grid,enter search criteria in the Criteria box. Click the Sort drop-down arrow to specify a sort order for the records. Click the Save button on the Query Design Toolbar,type a name to save the query.

7 Create a Query using a Query Wizard In the Queries tab in the Database Window,Click New button and Click the Wizard that corresponds to your kind of query. Click the Table/Queries drop down arrow and select a table with fields to include in the query. Click each available field that has to included and click Add button(>). To include all,Click Add All(>>). Click Next to continue. If you have selected numeric fields and want a summary of it, Click Summary Options to specify the calculation for the field. Click Next to continue. In the final wizard dialog box,type the name of the query. Click an option to view the query results or display the query in Design view. Click Finish.

8 Add a Field to a Query Display the query in Design view. In the field list at the top of the Design view window,double-click a field name to place the field in the next available column in the design grid, or click and drag a field to a specific column in the design grid.

9 Remove a Field from Query Display the Query in Design View. Select the field by clicking its column selector and press Delete. When you remove a field from a query design grid you are only removing it from the query specifications and not from the underlying table.

10 Add a Field from Another Table to a Query Display the query in Design view. Click the Show Table button on the Query Design Toolbar. Select the table that contains the fields you want to include in the query. Click Add. Click Close. Double-click or drag the fields you want to include to the design grid.

11 Retrieving records with Criteria Display the query in Design view. Click the Criteria box for the field for which you want to define a selection criteria. Type the first criterion you want for the Query.

12 Expand the Criteria with OR Display the Query in Design View. In the Criteria row, type the first criteria you want for the query. For each additional OR criteria,enter the criteria in a separate β€œor” row for the field.

13 Restrict Criteria with an AND condition Display the query in Design view. In the Criteria row, enter the first criteria you want for the query. In the same Criteria row, enter the additional AND Criteria for the other field(s) in the query.

14 Create a Parameter Query to Prompt you a Criteria Display the Query in Design view. Click the Criteria box for the field for which you want to be prompted to enter a value. Type the text of your prompt surrounded by square brackets. Click the Run Button on the Query Design Toolbar. Enter the criteria information. Click OK.

15 Create a Crosstab Query From the Queries tab in the Database Window,Click New,Click Crosstab Wizard, and then click OK. From the list at the top of the dialog box,select the table or query that contains the records you want to retrieve,and then click Next. Select the fields for the rows in the Crosstab Query, and then Click Next. Select the field for the columns in the Crosstab Query, and then click Next. Cont

16 In the Fields box,click the field whose values you want to be calculated and displayed for each row and column intersection. In the Functions box,click the function you want for the calculation to be performed. Click the check box if you want to see a total for each row, or clear the check box if you do not want to see a total for each row. Click Next to display the final Crosstab Query Wizard dialog box. Type a name for your Query. Click Finish.

17 Change to Design View from the Database Window In the Database Window,select the Query whose design you want to use. Click Design.

18 Switch Between Design and Datasheet View In Design View,click the View button on the Query Design Toolbar. In Datasheet view,click the View button on the Table Datasheet Toolbar.


Download ppt "MS-ACCESS BY SANGEETHA PARTHASARATHY Topics Covered Understanding different types of Queries Creating a Query Creating a Query using a Wizard Changing."

Similar presentations


Ads by Google