<< Click to Display Table of Contents >> Navigation: Data Module > Import & export > Data mappings > SQL Basics > Overview |
The complete topic of working with SQL is beyond the scope of this documentation. See here for more information.
The mapping system allows import / export to formats that are not in the same structure as the database.
The system uses SQL SELECT statements to process the data into the required format.
A SELECT statement retrieves rows from tables containing data. Depending on the statement one or many rows or columns will be returned from one or many tables.
Returns data from a single table.
SELECT [column] FROM [table] WHERE [condition]
Returns data from a single table.
SELECT [table1].[column1], [table1].[column2] FROM [table1]
INNER JOIN [table1] ON
[table1].[column1]=[table2].[column1] AND
[table1].[column2]=[table2].[column2]
SELECT [column1], [column2] FROM [table2]
WHERE [condition]
The UNION operator can be used between queries to combine their results into a single result set.
SELECT [columnZ] as 'column1' FROM [table1] WHERE [condition]
UNION
SELECT [columnX] as 'column1' FROM [table2] WHERE [condition]
...
The -- (double hyphen) and /* ... */ comment syntaxes are supported and can be embedded anywhere in a SQL statement.