Saved SQL Queries > Saved SQL queries > Creating a saved SQL query
  

Creating a saved SQL query

Create a saved SQL query to reuse an SQL query in multiple test cases. Use a connection to validate the SQL query. If the query is valid, you can also preview the metadata of the database.
    1On the navigation bar, click New > Saved SQL Query.
    2 Enter a name for the query.
    The name can contain ASCII, Chinese, Hebrew, and Japanese characters, digits, spaces, and the following characters:
    , _ -
    The name can't contain the following characters:
    ` " ' ! " # $ % & ( ) * + ' . / : ; < > = ? @ [ ] \ ^ ~ { } |
    3 Select a location to save the query.
    You can use the default project or folder location, or select a custom location. To use a custom location, click Browse, choose a location, and then click Select.
    4 Optionally, enter a description for the query.
    5Select the database type for which you want to create the saved SQL query. You can select one of the following database types:
    6Enter the SQL query to filter the data that you want to compare.
    The SQL query can have a maximum of 30,000 characters.
    7To validate the query, click Yes in the Validate Query field.
    Note: You can save the query without validating it. However, if the saved SQL query is not validated or is invalid, you can't use it in a test case.
    8From the Connection list, select a connection to validate the query.
    Data Validation indicates whether the query is valid or not. If the query is not valid, update the query and validate it again.
    9If the query is valid, you can click Metadata Preview to view the column details of the database, such as name, type, precision, and scale.
    10Click Save to save the SQL query.
    You can use the saved SQL query as a source or target in a test case.