Linux Format

Query questions

-

This tutorial covers creating a query using LibreOffic­e’s in-built GUI tools; however, these queries can only display and filter informatio­n you’ve requested. They don’t permit you to edit or remove the returned records or add new ones.

This is because what you’ve created is called a Select query. In order to add new records you need an Insert query, an Update one to edit existing records or a Delete query to remove them. MicrosoftA­ccess converts will be disappoint­ed to learn that there’s no similar method for generating any of those from the Queries menu.

For those occasions when you need make a bulk change to your database and only those kinds of query will do, head to Tools>SQL..., write what you want to do as a statement and then click Execute. For example, to add Charles Dickens as a new author in the BookCollec­tion database, you would use the following: INSERT INTO “Authors” ("FirstName”, “SecondName”, “Nationalit­y") VALUES ('Charles’, ‘Dickens’, ‘British');

You can also view the underlying code for any existing query by right-clicking on it, and create a new select query using an SQL (Structured Query Language) statement via Insert >Query (SQL View). For more details on coding your own queries, take a look at this handy online guide: http://bit.ly/SQL-advice 2.

Newspapers in English

Newspapers from Australia