Create, run a query to show duplicated records within a table.

There is no easy way to do this in LibreOffice Base. We have to use a roundabout solution.

23 Duplicate Records Table

First create a duplicated record by adding a record to the Mechanics table, repeating the first name and grade under a different staff number.

This could happen in real-life as an admin error.

Close the table.

24 Workaround

Create a new query in design mode.

Add the Mechanics table.

Select to display the Name field with the function ‘Group’. This will sort identical Names into groups.

In the next column, select all fields with the function ‘Count’. Then Press F5 to run the query.

25 Duplicate Query Result

The query results will return a table that shows you how many records there are for each name.

You can quickly see that one name has been duplicated.

We can then retrieve those duplicated records by changing the query.

26 Change Query

Change the first column to all fields using the asterisk (*)

Change the second column to the Name field with the criterion ‘Matthew Grove’, i.e. the text that is in the duplicated record.

Press F5 to run the query.

27 Show Duplicate Records

The query now shows the duplicated records.

You can then go to the table or use an SQL command to delete or amend the erroneous record.