Create, edit and manage queries

 


This topic explains how to create queries in NVivo—either by using the Query Wizard or by defining the criteria yourself. 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 using the Query Wizard

The Query Wizard steps you through the process of creating a new query. To create a query using the Wizard:

  1. On the Query tab, in the Create group, click Query Wizard.

  1. On the first screen of the Wizard, choose what you want to do (see below) and then follow the steps in the Wizard to create and run the query.

What do you want to do? Description

See where particular terms occur in content

This is a Text Search query.  When you create a Text Search query using the Wizard you can:

  • Enter the term or phrase that you want to find—click the Special button to combine multiple words with special characters and operators.

  • Look for exact words, or broaden your search—for example, also find words with the same stem. In NVivo Pro and NVivo Plus you can also search for synonyms of the word.

You can choose to search text in all your sources, or restrict the search to selected items or folders.

Refer to Run a Text Search query for more information.

Identify frequently occurring terms in content

This is a Word Frequency query.  When you create a Word Frequency query using the Wizard, you can:

  • Limit the number of words—for example, find only the top 20 words.

  • Exclude small words—for example, find only words with four letters or more.

  • Count exact words or broaden your concept of a word—for example, count the word or words with the same stem. In NVivo Pro and NVivo Plus you can also count synonyms of the word together.

You can choose to count words in all your sources, or restrict the count to words in selected items or folders.

Refer to Run a Word Frequency query for more information.

Search for content based on how it is coded

This is a Coding query.  When you create a Coding query using the Wizard, you can:

  • Find content that is coded at a particular node that you specify—for example, find content coded at the node economy .

  • Find content coded to all the nodes that you specify—for example, find content that has been coded at the nodes negative and natural environment.

  • Find content coded at any of the nodes you specify—for example, find content that has been coded to any of the nodes habitat, forest or landscape.

  • Find content coded at any node with particular attribute values—for example, if you have coded content to case nodes, you could find all the responses of Year 8 students, by finding content coded to nodes with the Year Level attribute equal to 8.

You can choose to look for coded content in all your sources, or restrict the query to selected items or folders.

Refer to Run a Coding query for more information.

Cross-tabulate how content is coded

(NVivo Pro and Plus only)

This is a Matrix Coding query.  When you create a Matrix Coding query using the Wizard, you must choose what you want to show in the rows and columns of the matrix.

Matrix Coding queries often show nodes in both the rows and columns, but you can also select sources, sets or Search Folders. You can select specific sources or nodes to show as the rows and columns or select content that particular attribute values or meets attribute value conditions (.e.g. age > 40).

Here are some examples showing how you can use Matrix Coding queries:

  • Select thematic nodes as the rows and then select node attribute values male and female as the columns. The matrix created by the query will allow you to see whether the men and women you interviewed were concerned with different issues.

  • Select nodes representing particular government initiatives for the row, and then select node representing negative attitudes and positive attitudes as the columns. The matrix will allow you to see which initiatives were most negatively and positively perceived. You can then explore the coded material that represents the intersection of a row and column to review the negative comments made by the interviewee.

You can choose to create the matrix based on coding in all your sources, or restrict the query to selected items or folders.

Refer to Run a Matrix Coding query for more information.

Top of Page

Create a query outside the Wizard

If you are familiar with NVivo queries (or want to use features that are not available in the Wizard), you can create queries outside the Wizard. Some types of queries cannot be created with the Wizard—for example, Compound and Coding Comparison queries.

To create a query outside the Wizard:

  1. On the Query tab, in the Create group, click the icon for the query you want to create.

  1. Define the criteria for your query. For detailed information on creating different types of queries, refer to the following topics:

Run a Text Search query

Run a Compound query

Run a Word Frequency query

Run a Coding Comparison query

Run a Coding query

Run a Group query

Run a Matrix Coding query

 

  1. Run the query. The results are displayed in Detail View.

NOTE: You can add the query to your project to run again. You can save the results of some queries—refer to Manage query results for more information.

Top of Page

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:

  • Click the red cancel button beside the progress bar that is displayed at the bottom of the window when the query is running.

Top of Page

Delete a saved query

  1. In List View, select the query you want to delete.

  2. On the Home tab, in the Editing group, click Delete.

Top of Page

Modify the criteria of a saved query

You can change the criteria of a saved query and then run it again.

  1. Depending on the type of query, do one of the following:

  • Double-click the query to open it.

  • Open the query properties and go to the criteria tab.

  1. Modify your criteria for the query.

  2. Run the query.

NOTE:  You can only view and edit criteria if the query is supported in your edition of NVivo. For more information refer to About queries (Working with queries across editions).

Top of Page

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.

  1. Do one of the following:

  • Double-click the query in List View, 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.

NOTE:  You cannot run queries that include criteria not supported in your edition. For more information refer to About queries (Working with queries across editions).

Top of Page

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.

  1. On the Query tab, in the Actions group, click Last Run Query.

  1. When the query opens in Detail View, do one of the following:

  2. Click the Run Query button at the top of Detail View.

  3. On the Query tab, in the Actions group, click Run Query.

NOTE You can only run the most recent query for the current session. If you close NVivo, the last run query is not available when you re-open the application.

Top of Page