SQL Query History

The SQL Query Historyy window allows you to view, search, and edit the executed queries. To open the window, click SQL Query History icon on the SQL toolbarSQL Query History on the SQL toolbar. Alternatively, on the View menu, point to Other Windows and then click SQL Query History.

The window looks in the following way:

Query mSQL Query History window

Setting Up SQL Query History behavior

To set up behavior of SQL Query History:

  1. On the Tools menu, click Options.
  2. In the Options dialog that opens, navigate to Environment > Documents > SQL Query History.
  3. To set the period for storing query SQL Query History, in the Store executed queries within field, set the number of days to store executed queries. The default value is 60 days.
  4. Optional: Modify the folder path to store the SQL Query History database, maximum script size to store, and timeframe for default output of SQL Query History.
  5. Optional: To clear the SQL Query History, click Clear SQL Query History.

SQL Query History options

Filtering SQL Query History

To find the required query, you can:

  • Type the search string into the Search box and specify query execution timeframe.
  • Use sorting, grouping, and filtering.

Filtering SQL Query History

Editing Query

To edit an executed query:

  1. Select the query in the list.
  2. In the text layout, right-click the object you want to edit and click Edit. The query will be opened in a new SQL document.

Editing a query

Exporting SQL Query History to a .CSV File Format

To export SQL Query History to a .csv file format, click Export to CSV, specify a file name, and click Save.

Exporting to a .CSV file format