Working with SQLiteStudio

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Data Export

SQLiteStudio exports data to CSV, PDF, HTML, JSON, and XML, or it can export SQL statements. To do this, either click directly on the Export icon (the arrows moving apart) or select Tools | Export in the menu.

In the first dialog of the wizard, you'll need to choose what you want to export: a whole database, a single table, or a query result. Then, confirm your choice by clicking on Next > . Usually, you will want to export a single table, such as staff . In this case, you specify the appropriate table in the next window; SQLiteStudio suggests the database and table currently in use. Below Options , you set the scope of the data export (table data, indexes, triggers) and then press Next > .

The following window is used to determine the output format and the target file. The points here depend on the output format that you selected; for CSV, they are similar to the Import function (Figure 12). The HTML export options are shown in Figure 13.

Figure 13: The selections for the export scope depend on the format used (HTML here).

The export to various formats such as CSV, JSON, or SQL works as expected. If you don't mess around with the parameters, you can also import into other programs such as LibreOffice or PostgreSQL. The stumbling block is always in the header, which needs to be considered when importing into the target application.

The HTML output is visually perfect (Figure 14) as is the PDF output.

Figure 14: The output for HTML export.

SQLiteStudio does not offer to output views in the menus; you need to manually request this with Export and select Query results . Again, you will need some basic SQL knowledge for this. The query that grabs data from our sample telephone directory looks something like this:

select * from "Telephone Directory";

The other query dialogs are identical to those for exporting databases or tables; the supported formats are also the same.

Manual SQL Queries

For more complex queries, there is an SQL editor, which you can access via Tools | Open SQL editor (Figure 15). After entering your instructions, you need to click the small blue arrow above Query or press F9 to run them.

Figure 15: The SQL Editor in SQLiteStudio allows manual queries that you can implement as a view where applicable.

In the upper input field, type in your query, and the result will be shown in the middle. You will find errors and other messages at the bottom in the status section. You can also save the queries by clicking on the floppy disk icon. To load a statement file created in this way click on the folder icon to the right of the floppy disk. SQLiteStudio does not automatically execute the loaded file with the instructions; again, you need to click on the blue arrow.

Optionally, you can create a view directly from a query. To do so, click on the appropriate button with the stylized lightning flash to the left of the floppy disc icon (Create view from query ).

Buy this article as PDF

Express-Checkout as PDF

Pages: 7

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Getting started with LibreOffice Base

    Creating database applications with wizards and graphic editors – without SQL and programming – that's what the LibreOffice program Base, modeled after Microsoft Access, is all about.

  • Visualizing complex structures using Graphviz

    Network plans, nested dependencies, or binary trees – with Graphviz, you can visualize complex relationships in a simple way.

  • LibreOffice Base

    A database without a search function is like a car without an engine. The second part of our Base series is dedicated to implementing a database search.

  • Convenient private cloud with Seafile

    After the Prism and Tempora revelations, the writing's on the wall: Your data stored on public clouds isn't safe from the clutches of security agencies. Help can come only from a self-administered solution – yet Seafile provides a simple and ingenious approach.

  • Installing and testing Nextcloud

    Leading ownCloud developers, including the project founder Frank Karlitschek, became dissatisfied with the direction of the project, so they started Nextcloud, a fork of the code and a new company. The goal is to create a better balance among the company, clients, and users. We take a look at how Nextcloud is faring.