Create, edit and manage queries
This topic explains how to create queries in NVivo. You can save the queries that you create in NVivo and run them again as your project develops. For example, you could create a Coding query to gather all the material coded at global warming combined with carbon emissions—you could run this query again as the content coded at these nodes grows.
What do you want to do?
- Create a query
- Cancel the execution of a query
- Delete a saved query
- Modify the criteria of a saved query
- Re-run a saved query
- Re-run the last query
Create a query
On the Query tab, in the Create group, click the icon for the query you want to create.
Define the criteria for your query—for example, you might define a Text Search query that finds all occurrences of the word water. For detailed information on creating different types of queries, refer to the following topics:
Click the Run Query button at the top of Detail View. When the query finishes running, the results are displayed in Detail View.
To save the query in your project, so that you can easily run it again, click the Save Query button, and then enter a name for the query. By default, queries are stored in the Queries folder. You can create your own folders for queries and organize them to suit your project.
You may have no need to save the results of your query—if you do not save the results, they are discarded when you close your project (or close the Open Item). You can save the results of a Text Search, Coding or Matrix Coding query in your project—refer to Manage query results for more information.
Cancel the execution of a query
You can cancel a query if it is taking too long to run or you want to revise the criteria.
To cancel the query:
To cancel the query, click the Cancel button beneath the progress bar.
Delete a saved query
In List View, select the query you want to delete.
On the Home tab, in the Editing group, click Delete.
Keyboard Shortcut To delete a query, press ⌘+DELETE
Modify the criteria of a saved query
You can change the criteria of a saved query and then run it again.
Open the query.
Modify your criteria in the panel at the top of Detail View.
Click the Run Query button to save your changes and run the query.
Re-run a saved query
When you set up and save a query, you can re-run it as your project progresses. For example, you might run the same Coding query every month.
Do one of the following:
Open the query and then click the Run Query button at the top of Detail View.
Select the query in List View, and then, on the Query tab, in the Actions group, click Run Query.
Re-run the last query
You can open the most recent query (even though you may not have saved it in your project) and run it again.
On the Query tab, in the Actions group, click Last Run Query.
When the query opens in Detail View, do one of the following:
Click the Run Query button at the top of Detail View.
On the Query tab, in the Actions group, click Run Query.