Show Contents / Index / Search

Create an SQL Query

A common way to receive data from an AS/400 is to collect only the data you need from one or more files in the host database; for example, to assemble a list of employee addresses and payroll information, you can collect and transfer only that information to a PC file or to your display, even if the information resides in different host files. You can also specify how to sort data or set conditions that determine which records are transferred. To do this, you would create an SQL query.

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

To create an SQL query

  1. Start Reflection and log on to the host computer as usual.
  2. Open the Transfer dialog box as follows:

    If you are using this "look and feel"

    Do this

    The Reflection button

    The Reflection Ribbon

    On the Session tab, from the Transfer group, click File Transfer.

    The Reflection button

    The Reflection Browser

    On the Reflection menu, choose Tools and then File Transfer.

  3. Click Show Host Files. (It may be necessary to enter your user name and password.)
  4. Select one or more host files from which to transfer data.
  5. Click Settings, and then click the SQL tab.

    The database options Select, Where, Order by, Group by, Having, and Join by appear as text boxes.

  6. Do one of the following:
    • If you already know the syntax for the statement or clause, type it in the text box.


    • If you don't know how to create the statement or clause, click the arrow button to the right of the option, and then in the dialog box that opens, specify the field names, functions, operators, options and so on.

      The statement is automatically created from your selections.

      Note: If the transfer is one you'll be performing regularly, you can save your transfer settings in a transfer request file.

Related Topics

SQL Tab (Transfer Settings Dialog Box)

Receive Data from an AS/400

Create a Transfer Request File

AS/400 Transfer