Skip to main content

Open and update a saved query

Open a saved query to see its SQL, run it again, or change it. When you save, you choose to overwrite the query or save your changes as a new one.

Prerequisites​

  • Your role lets you save queries. Your Admin assigns roles in Access management.
  • You have at least one saved query. See Find saved queries.

Open a saved query​

  1. Select Queries in the sidebar.
  2. Find the query by name.
  3. Select the query name.

You can also select ⋮ at the end of the row, then Open in Editor. Both give the same result.

Query Editor opens the query in a new tab named after it. The tab loads the latest saved SQL and the catalog and schema saved with it. Tabs you already had open stay as they are.

If the query is already open in a tab, Query Editor switches to that tab instead of opening a second one. If you already have 10 tabs open, no new tab opens and you see Maximum 10 tabs allowed.

note

If you see Query not found or already deleted., the query was deleted, for example in another browser. You stay on the Queries page and the list refreshes.

If your role can save queries but not run them, you can still read and edit the SQL. Execute is disabled.

Save your changes​

  1. Change the SQL in the tab.
  2. Select Save on the toolbar.
  3. In Save query, select Overwrite existing, then select Save query.

The saved query is updated. On the Queries page, Updated shows the new time.

warning

Overwriting replaces the saved SQL. There is no version history, so you cannot get the old SQL back. To keep the original, select Save as new in step 3 instead.

Rename a saved query​

The Queries page has no rename option. You rename a query when you save it in Query Editor.

  1. Open the query and select Save on the toolbar.
  2. In Save query, type the new Query name.
  3. Select Overwrite existing, then select Save query.

The same query now has the new name. Its Created date does not change. To keep the old query and save a copy under the new name, select Save as new instead.

Next steps​