Loading data through a SQL query

This page refers to Labeljoy 5, which is not the latest release!

Please upgrade to Labeljoy 6 to get the latest version of the software with all its amazing features, or go to Labeljoy 6 user guide if you already own it.

loading data through a SQL query

The SQL language (Structured query language) is supported by the majority of data management applications.
Labeljoy supports the use of SQL queries to enable you to custom-define the dataset you wish to use in your printing jobs.
Labeljoy permits the use of SQL queries for data sources that support it.

Example:
Suppose you want to load a set of addresses from a database that includes an ADDRESS table made up of the typical fields found in this type of application, a SQL query similar to the following can be used:

SELECT last_name, first_name, address, city, zip, state, country
FROM ADDRESS
WHERE first_name LIKE 'JO%'
AND city = 'PHOENIX'
ORDER BY first_name, zip


The previous query will load from the ADDRESS table the fields last_name, first_name, address, city, zip, state and country of all records that have the first name field starting with JO (Johnson, John, Joel, and so on), and the city field set to Phoenix. The resulting set of records will be sorted by the last name and then by the zip code.