Data Manipulation
Data Manipulation
While importing files, make sure you select text file and not excel
file, as .csv files are plain text.
When they ask for a set number of decimal places in a field, choose
Fixed in Format.
Ensure that the dates displayed in the table are in the correct
=COUNT(\[Primary_field\])
Count number of fields in
Always use primary field as it is the only
a report
unique field
You can sort data based on a single criterion - such as by name, date, or
numerical value
For example, you might sort a list of students in ascending order by their last
names
To sort the customer's tables by LastName in either ascending or descending
order:
You can also use multiple criteria to select data. For instance, you might want to
select all customers from a specific city who have also purchased in the last month
E.g. to return all customers from London who purchased in the last 30 days:
1. Follow the steps above to start a new query and add the City field with 'London' as
the criteria
2. Drag another field you want to query to the QBE grid. For example, if you're looking
for customers who purchased in the last month, drag the LastPurchaseDate field
3. In the Criteria row under this field, type Date()-30
Wildcards are used with the LIKE operator to search for patterns. The most common
wildcard characters are:
o % - Represents zero, one, or multiple characters
o _ - Represents a single character
E.g. to return all customers whose names start with 'J':
1. Start a new query and drag the field you want to query to the QBE grid. For example,
if you're looking for customers whose names start with 'J', drag the Name field
2. In the Criteria row under this field, type J*
Exam Tip
Remember, the exact steps and symbols used for wildcards may vary depending on
the specific DBMS and its version. In Microsoft Access, the asterisk (*) is used as the
wildcard character to represent multiple characters, while the question mark (?)
represents a single character
When referring to field names from the exam question, make sure you copy it exactly
the way it appears in the question
Make sure you give the information asked for in the question and not a different field
Worked example
A student is setting up a database of information about volcanoes for a Geography
project. The following is part of the database.
Operators such as AND, OR, NOT, LIKE, >, >=, <, <=, =, <> can be used to search
the volcano database. The search criteria for all the dormant volcanoes with a height
of less than 1000 metres would look like this:
a. write down the search criteria that will produce a list of all the volcanoes that are
not extinct in China that also last erupted before the year 1900.
[6]
State = NOT ‘Extinct’ AND Country = ‘China’ AND Last_eruption < 1900
b. write down the names of the volcanoes that match the requirements of part (a).
[2]
Tengchong [1]
Wudalianchi [1]
c. The data is sorted into ascending order of height. Write down the name of the
volcano which would now be in the first record.
[1]
Wudalianchi [1]
You can also use multiple criteria to select data. For instance, you might want to
select all customers from a specific city who have also purchased in the last month
E.g. to return all customers from London who purchased in the last 30 days:
1. Follow the steps above to start a new query and add the City field with 'London' as
the criteria
2. Drag another field you want to query to the QBE grid. For example, if you're looking
for customers who purchased in the last month, drag the LastPurchaseDate field
3. In the Criteria row under this field, type Date()-30
Wildcards are used with the LIKE operator to search for patterns. The most common
wildcard characters are:
o % - Represents zero, one, or multiple characters
o _ - Represents a single character
E.g. to return all customers whose names start with 'J':
1. Start a new query and drag the field you want to query to the QBE grid. For example,
if you're looking for customers whose names start with 'J', drag the Name field
2. In the Criteria row under this field, type J*
Exam Tip
Remember, the exact steps and symbols used for wildcards may vary depending on
the specific DBMS and its version. In Microsoft Access, the asterisk (*) is used as the
wildcard character to represent multiple characters, while the question mark (?)
represents a single character
When referring to field names from the exam question, make sure you copy it exactly
the way it appears in the question
Make sure you give the information asked for in the question and not a different field
Worked example
A student is setting up a database of information about volcanoes for a Geography
project. The following is part of the database.
Operators such as AND, OR, NOT, LIKE, >, >=, <, <=, =, <> can be used to search
the volcano database. The search criteria for all the dormant volcanoes with a height
of less than 1000 metres would look like this:
a. write down the search criteria that will produce a list of all the volcanoes that are
not extinct in China that also last erupted before the year 1900.
[6]
State = NOT ‘Extinct’ AND Country = ‘China’ AND Last_eruption < 1900
b. write down the names of the volcanoes that match the requirements of part (a).
[2]
Tengchong [1]
Wudalianchi [1]
c. The data is sorted into ascending order of height. Write down the name of the
volcano which would now be in the first record.
[1]
Wudalianchi [1]
Producing Reports to Display Data
Reports should display all the required data and labels in full. For example, if you're
creating a sales report, it should include all relevant fields, like product name,
quantity sold, and total sales
Report Header: This appears at the beginning of the report. This is typically where
you would put the report title and other introductory information
Report Footer: This appears at the end of the report. This is where you might put
summary or conclusion information
Page Header: Appears at the top of each page. This might contain the page number
and the date
Page Footer: Appears at the bottom of each page. This might also contain the page
number and the date
The report title should be set in the report header. It should be clear, concise, and
accurately reflect the contents of the report
You can control the display of data and labels in your report. For example, you might
choose a tabular format, where data is arranged in rows and columns, or a columnar
format, where each data field is listed vertically
Aligning Data and Labels
Data and labels should be aligned appropriately. For example, numeric data is often
right-aligned, and decimal points should be aligned for easy comparison
You can control the number of decimal places displayed, the use of a currency
symbol, and the display of percentages. For example, a total sales field might be
displayed with two decimal places and a currency symbol