SQL Tab (Transfer Settings Dialog Box)

Getting there

Use this tab to create SQL queries for extracting data from AS/400 files. Type text directly into the text boxes, or click any of the buttons on the right to open a dialog box to build a query.

Note: From the Transfer dialog box, select at least one host file before you build your query. Reflection displays field information from the specified file to help you build the query.

If you need help building your SQL query, consult your SQL documentation.

 

Select

Start building your SELECT statement by specifying fields (or columns) to transfer.

 

Where

In this box, add a WHERE clause to your SELECT statement. Specify one or more conditions that must be met for a record to be transferred.

 

Order by

In this box, add an ORDER BY clause to your SELECT statement to sort the records resulting from the query. You can sort only by fields specified in your SELECT statement.

 

Group by

In this box, add a GROUP BY clause to your SELECT statement to specify how to group the resulting data after the requested calculation (function) is performed.

This clause is necessary when a function and multiple fields are specified in your SELECT statement.

 

Having

In this box, add a HAVING clause to apply a condition to a function of the SELECT statement.

To enable the Having box and dialog box, you must first add a GROUP BY clause.

 

Join by

In this box, add a JOIN clause to your SELECT statement to specify how you want data from multiple files or members combined.

To enable the Join by box and dialog box, you must have selected multiple files or members on the Host side of the Transfer dialog box.

 

Return records with missing fields

When joining records from more than one file, there may be cases where a record cannot be found to complete the join.

Related Topics

Create an SQL Query

Receive Data from an AS/400

AS/400 Transfer