Show TOC

Function documentationExecuting a Native SQL Statement Locate this document in the navigation structure

 

You want to create an SQL check step and want additional information, for example, about entries in database tables in a managed system.

This function is useful, if you want to create SQL check steps of the type "existence of table entry", "number of table entries" or "descriptive".

If you execute native SQL statements in the Solution Documentation Assistant, you spare yourself having to search for the respective systems, logging on and executing the corresponding transactions there in order to get the desired information.

Note Note

You can only execute native SQL statements that read the database in the system that is specified using the RFC destination.

The execution of native SQL statements is purely for information purposes and is not technically related to existing check steps or check steps to be created.

End of the note.

Prerequisites

  • You are familiar with native SQL statements.

  • You have called the Solution Documentation Assistant and chosen Create Check Step.

Activities

  • Choose      Native SQL Execution   .

    The Native SQL Execution dialog box appears.

  • You specify the following properties:

    • RFC destination: Choose the system in which the SQL statement is supposed to be executed.

    • Max. number of rows. Specify the maximum number of rows of the result set to be displayed. Choose a value between 1 and 255.

      Recommendation Recommendation

      Keep the number of rows in the result set as low as possible in order to keep the database and data transfer workload low.

      End of the recommendation.
    • Native SQL statement: Enter the SQL statement.

      Example Example

      • To count all entries in table "sflight", enter select count(*) from sflight

      • To display all data that uses currency DM in the “sflight” database table, enter select * from sflight where currency = 'DEM'

      • To display the contents of the fields “connid”, “carrid”, and “planetype” for those entries in table “sflight” for which the content of field “carrid” is “LH”, enter: select connid, carrid, planetype from sflight where carrid = 'LH'

      • To display the contents of the fields “connid”, “carrid”, “planetype”, and “fldate” for those entries in table “sflight” for which the entries in field “carrid” are identical in table"sflight" and table "sbook", enter: select s1.connid, s1.carrid, s1.planetype, s1.fldate from sflight s1, sbook s2 where s1.carrid = s2.carrid

      End of the example.
    • To execute the native SQL statement, choose Execute.

      You get a table with the result of the native SQL statement.