Office Software
Advanced Database – Create, run a query to save selected data as a new table.
Imagine we want to copy all of the records with a job number of 10 and above from the ‘Jobs’ table into a new table called ‘Recent Jobs’ Of course, we could do this manually by creating a new table and entering the data records one by one. This is time consuming, so we prefer…
Read MoreAdvanced Database – Create, run a query to delete records in a table.
Imagine we wanted to delete the last 3 jobs from the ‘Jobs’ table as the customers cancelled last minute. We could go through and manually delete them, but imagine if we had hundreds of records to delete (maybe we archived them somewhere else). This would take a long time. We can use the DELETE SQL…
Read MoreAdvanced Database – bound control properties
Apply, remove bound control properties like: limit to list, distinct values. Limit to list and distinct values options are only available in MS Access, not Libreoffice Base. Limit to list changes the properties of a combo box to only allow values from the list. To do this in Base, you simply need to select the…
Read MoreAdvanced Database – Create, run a query to append records to a table.
Appending records means taking them from one table and putting them into another. In MS Access there is a built-in function to do this, but in Base you will have to use an SQL query. Imagine we want to create an archive system for completed jobs. To start with, create a new table called New…
Read MoreAdvanced Database – Create, run a query to add records to a table.
To add records to a table in Base you must use an SQL statement, using the command INSERT. Go to Tools->SQL and in the SQL Command box type: INSERT INTO “Jobs” VALUES (’18’, ‘105’, ‘Repair handbrake’, ’17th JAN 17′, ‘RS1’) Notice that the command inserts a record that includes all 5 fields in the same…
Read MoreAdvanced Database – Create, run a query to update data in a table.
Open the Order Details table. If we notice that there is an error with certain data, sometimes it is easy to change it using the ‘Update’ command. Imagine we notice that Part Ref ‘D1’ (spark plugs) can only be bought in packs of 10, but many records show less than 10 – a human error.…
Read MoreQueries in LibreOffice Base compared to MS Access
Many of the ‘action’ queries that we are going to look at in this section differ in the way that they are executed between MS Access and LibreOffice Base. Queries that directly update, add to, append or delete records in a table can be done without using SQL code in MS Access, by using certain…
Read MoreAdvanced Database – Apply a self join
For this example, we need to create a new table with the properties and data shown. A self join links a table to itself. In the employee table for instance, if we want a query to list each employee and the name of who they report to, we would need a self join. Let’s first…
Read MoreAdvanced Database – Apply, modify a subtract join
For this example we need to add a record to the ‘Car and owner details’ table with a Car Reg Number that doesn’t appear in the ‘Jobs’ table. Open the Car and owner details table and add a new record at the bottom of the table. Don’t add anything to the jobs table. Close the…
Read MoreAdvanced Database – Apply, modify an outer join
An outer join allows you to display ALL records from one table, but only records in the other table that match the related fields. You can choose between a Left outer join or Right outer join in the Type drop-down menu. Choosing Left join will display all records from the left-hand table, Right will display…
Read More