Get data from a database view

  1. On the properties panel of the Data access activity, click Configure.
    The Data access configuration dialog box is displayed.
  2. On the Database connection list, select the process or server variable to specify the database connection string that holds the details of the relational database.
  3. On the Type list, select Views.
  4. On the Views list, select the view to retrieve records for. All existing views are listed and all the columns for the views appear under Available columns.
  5. On the Available columns list, select the columns to add records to and click .
  6. To get the records for the selected view, select one of the following options on the Return list.

    Option Description

    Multiple rows

    Retrieves multiple rows.

    1. Map the Return resultset to output parameter to the dynamic complex variable.

    2. Map the Return row count to output parameter to the long variable.

      See Create process variables.

    Single row

    Returns a single row. (Default: Single row)

    Use aggregate

    Retrieves the minimum and maximum values and the row count.

    1. To retrieve the minimum value of a column, select Min value for the column and on the Output min value to list, select the variable that holds the minimum value.

    2. To retrieve the maximum value of a column, select the Max value for that column and Output max value to list, select the variable that holds the maximum value.

    3. To get the count of rows within a table, select Count rows and on the Return row count to list select the variable that holds the count of rows.

    Note You must map all the output parameters with the relevant variables. Note that ODBC and OLEDB do not support xml data type.

  7. Configure the query in the same way as for retrieving a table. See Get records from a database table.
  8. Click OK.