Are you sure you are connected to NPM database? When you are using SQL server Management Studio to run the query, select proper database from combobox on the toolbar (MASTER is selected by default).
Or you can add extra line before the query
USE [database_name]
where database_name is name of your NPM database.