Download - MELJUN CORTES querying the database
![Page 1: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/1.jpg)
Querying the
Database
MELJUN CORTESMELJUN CORTES
![Page 2: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/2.jpg)
QUERY A question represented in a way
the OO.Org Base can understand Are used to find more item one
record, let you specify the field you want to see in the Data sheet
To access only a subset of your data that can be well defined by a filter condition
![Page 3: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/3.jpg)
Dynaset
Is the set of records resulting from a query or filter
When you edit records in a dynaset, you are actually editing the records in the original table
![Page 4: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/4.jpg)
Creating Query using Design View Open the database file where you
want to create the new query Select Queries object/icon from
Database Pane Click Create Query in Design View Run the query (use Run button)
![Page 5: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/5.jpg)
Querying with Text Exact text dataExamples:
Pop (or 'Pop') Pasig (or 'Pasig')
Using Wildcards Symbols that represent any character
or combination or characters
![Page 6: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/6.jpg)
Wildcards(or wildcard characters) Asterisk (*) – represents any
collection of charactersExample: R*TResult : RT, RAT, RENT, RESET Question Mark (?) – represents any
individual characterExample: R?TResult : RAT, ROT, RIT, RUT
![Page 7: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/7.jpg)
Querying with Numbers Exact numerical value
Default, assumed to be equal to value indicatedOPERATOR – is a sign or symbol that specifies the
type of calculation to perform within an expression
Other comparison operators> greater than< less than>= greater than or equal<= less than or equalNOT not equal toBETWEEN ___ AND ____
![Page 8: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/8.jpg)
Criterion
Are used to select records in queries and filters
Is a set of conditions that must be matched in order for a record to be included in a dynaset
![Page 9: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/9.jpg)
Compound Criteria AND Conditional QueryPlace criteria on the same line(Use CRITERIA row of the design grid)
OR Conditional QueryPlace criteria on separate lines(Use CRITERIA and OR rows of the
design grid)
![Page 10: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/10.jpg)
Expression
Are used to specify criteria in queries perform updates in an action query
Is any combination of mathematical or logical operators, constants, functions, names of fields and properties that evaluates to a single value
![Page 11: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/11.jpg)
JOINING TABLES Select the tables to bring out the
field lists at the upper pane of the Select Query window
Access will draw a line, called join line, between matching fields in the two tables
Select fields either the tables, enter criteria, run query
Access will join the tables automatically
![Page 12: MELJUN CORTES querying the database](https://reader036.vdocuments.pub/reader036/viewer/2022082503/55c37210bb61eba8498b4733/html5/thumbnails/12.jpg)
Sorting Data in a Query Sort key – field or fields on which
the records are sorted Primary sort key (or major key) –
more important key when sorting on more than one field
Secondary sort key (or minor key)
Specify sort order in the SORT line of the design grid, e.g., sort key on the left will be the major sort key)