SQL queries are used when downloading one or more files
to your PC. An SQL query allows you to select specific records, how
they are sorted, and how they are grouped. You can enter the SQL query
directly into the edit box or use the SQL Query Options dialog to
create SQL queries.
- Start an iSeries Display session.
- Click .
- In the Host File Transfer window, click .
- Click the SQL tab.
- There are two method to building SQL queries:
- Type the SQL query directly in the SQL Query field.
Click OK when finished.
- Click Options to connect to the server
and retrieve the field information for each file selected. Continue
to step 6.
- Click Options to connect to the
server.
- Log in to the host or click Cancel.
- Build your SQL Query statements in the SQL Query Options
window.
Each tab in the SQL Query Options window represents an SQL
query condition:
- Select: Determines which fields to transfer.
Required.
- Where: One or more conditions that must
occur for a record to be transferred.
- Group by: Separates the result data into
more than one group.
- Having: One or more conditions that must
occur by each summary record to be transferred.
- Order by: Specifies an order in which to
return the rows.
- Join by: Specifies how the data from multiple
files is combined.
Each clause must be on a separate line. The default SQL
query of SELECT * is used when there is no custom SQL query configured.
For example:
SELECT *
WHERE (t1.IMITM = t2.IMITM)
- Click OK to save and close the SQL
Query Options window.
- Click OK to save and close the Transfer
Setup window.