Modifying Queries

Use Query Manager component to open and view queries.

Image: Query Manager Search Results page

This example illustrates the fields and controls on the Query Manager search results page.

Query Manager Search Results page

To open an existing query from your browser:

  1. Select Reporting Tools > Query > Query Manager.

    The Query Manager search results page appears.

  2. Search for a query using the basic or advanced search functions.

    Both search types enable you to select from the following search by criteria: access group name, description, folder name, owner, query name, type, uses field name, and uses record name. The basic search enables you to search using the begins with condition. The advanced search enables you to perform a progressively narrower search using one or more search by criteria and selecting from a choice of conditions for each search by criterion.

    The following list provides instructions on using search by criteria:

    • To perform a basic search by name, enter the name of the query in the Search By field and click the Search button.

      If you do not know the name of the query and want to search through a list of queries, leave the Search For field blank and click the Search button to display a list of up to 300 queries.

      Perform a partial search by entering part of a query name or description in the Search By field. Use the drop-down list to search queries by either name or description, and then click the Search button to display a list of queries that match your search criteria.

      The Search Results page appears and lists all the queries that match the search criteria. The following information appears: query name, query description, and ownership (public or private).

    • If you know the name of the query that you want, enter it in the Search By field and click the Search button.

    • To perform an advanced search, click the Advanced Search link.

      On the advanced search page, select the appropriate search by criteria and conditions and enter a search string in each of the corresponding fields. Then click the Search button to display a list of queries that match your search criteria. The Search Results page appears listing the query name, description, owner, and folder for all the queries that match the search criteria.

  3. Click the Edit link on the row of the query that you want to modify.

Use the Rename Queries page to rename existing queries.

Image: Rename Queries page

This example illustrates the fields and controls on the Rename Queries page.

Rename Queries page

To rename a query:

  1. Select PeopleTools > Utilities > Administration > Query Administration.

  2. On the Admin (Administration) page, select a predefined search or a manual search by clicking the respective Search button.

  3. Select the queries from the Query List.

  4. Click the Rename button.

    The Rename Queries page appears, listing the current query names and query owners.

  5. Enter new names for the queries in the New Name field.

  6. Click the OK button to save your changes.

Note: Alternatively, you can use the Query Manager search page (Reporting Tools > Query > Query Manager) to rename a query. You must first select a query that you want to rename, and then select Rename Selected from the Action drop-down list.

You can delete any public query that you have access to as well as any private query that you have created.

To delete a query:

  1. Select PeopleTools > Utilities > Administration > Query Administration.

  2. On the Admin (Administration) page, select a predefined search or a manual search by clicking the respective Search button.

  3. Click the Delete button.

    The Query Delete Verification page appears.

  4. Click the Yes button to confirm the deletion or click the No button to avoid deletion.

Note: Alternatively, you can use the Query Manager search page (Reporting Tools > Query > Query Manager) to delete a query. You must first select a query that you want to delete, and then select Delete Selected from the Action drop-down list.

At times, you might want to update a query to reflect new conditions or copy an existing query and modify it for other uses. You can open a query, examine it to determine whether it is suitable, and then use the Save As function to save it with a new name.

To update an existing query:

  1. Select Reporting Tools > Query > Query Manager.

  2. On the Query Manager search results page, find the query that you want to modify and click its Edit link.

    The Fields page appears.

  3. Access the tab that you want to modify the information—except the Run tab.

  4. Enter the new information.

  5. Click either the Save button to update the existing query, or the Save As link to save a different instance of the query under a new name.

Note: When using Microsoft Windows-based Query Designer, any modification to a previously saved query must be saved before downloading query results to Microsoft Excel. A message appears reminding you to save your work. This is to ensure that accurate data are displayed. New ad hoc queries that have never been saved before in the database can be downloaded to Microsoft Excel without having to save after every modification.

A record definition that is used in a query may change. When this occurs, PeopleSoft Query automatically repairs the query when it is opened. A warning message informs you about the problem and what actions were taken.

The following table lists the problems and their corresponding actions.

Problem

Action

Field deleted from the record definition is a selected field.

The field is removed from the selected list.

If the field is the only field selected, the query cannot be saved.

Field deleted from the record definition is used in a prompt.

No action taken.

This does not affect the prompt unless the field has been completely removed from the database, and the prompt label is either a short or long translate.

Field deleted from the record definition is used in an expression.

The field is removed from the expression.

This may result in an invalid expression, but the query can be saved.

Field deleted from the record definition is used in a criterion.

The criterion is removed. If criterion is a subquery criterion, all lower subqueries are deleted.

Record deleted is the first record in the query.

Error returned. The query cannot be repaired.

Record deleted is not the first record in the query.

The record and all fields are removed.

Note: The actions specified previously for deleted fields apply.

Record deleted contains hierarchy joins below it.

Record and all records joined below are removed.

Note: The actions specified previously for deleted fields apply.

Note: If a record has been deleted, the query no longer appears in the list of queries because you no longer have access to all of the records in that query. To open such a query, you need to use Query API.