Ps Query 101 Basics Training Manual
Ps Query 101 Basics Training Manual
ctcLink PS Query 101 Basics by Paula McDaniel is licensed under a Creative Commons Attribution-NonCommercial-
NoDerivatives 4.0 International License
i
PS QUERY 101
Table of Contents
Course Goal ..................................................................................................................................................... 1
Course Learning Objectives ............................................................................................................................. 1
How to Use This Manual ................................................................................................................................. 1
The PS Query 101 Training Guide is comprised of three sections. ..................................... 1
Each section will include: .................................................................................................... 1
Section 1 Introduction ..................................................................................................................................... 2
Introduction to PeopleSoft Query ................................................................................................................... 2
What is a Relational Database? .......................................................................................... 2
ctcLink PeopleSoft Pillars and Modules .............................................................................. 4
Query Development Life Cycle ........................................................................................... 6
Phase I Develop Query in PCD ......................................................................................... 6
Phase II Request Migration to Production (PRD) ............................................................... 7
Phase III Data Services Review and Migration to Production (PRD) ................................. 7
Phase IV Modification of Existing Query ............................................................................. 7
PS Query Terms ................................................................................................................... 7
Section 1 Review ............................................................................................................................................. 9
Section 1 Knowledge Test ............................................................................................................................... 9
Section 2 Introduction ................................................................................................................................... 13
Using PeopleSoft Query ................................................................................................................................ 13
Accessing PS Query ........................................................................................................... 13
Allow Pop-Up Windows ..................................................................................................... 13
Using PeopleSoft Query Viewer ........................................................................................ 14
Searching Using Query Viewer ......................................................................................... 14
Query Viewer Options ....................................................................................................... 16
Using PeopleSoft Query Manager .................................................................................... 17
Searching Using Query Manager ...................................................................................... 17
Searching Using Wildcards ............................................................................................... 18
Query Manager Options .................................................................................................... 18
Using PeopleSoft Schedule Query ................................................................................................................. 20
Using PeopleSoft Schedule Query through Query Viewer/Manager ............................... 21
Scheduling a Query to Run Through Query Viewer or Query Manager ........................... 21
Create Your Own Scheduled Query through Query Viewer/Manager .......................................................... 26
Scheduling through Query Viewer/Manager – Simplified Instructions for a New Run
Control ID .......................................................................................................................... 26
Criteria to Use in the Query .............................................................................................. 26
Scheduling through Query Viewer/Manager – Simplified Instructions for an Existing Run
Control ID .......................................................................................................................... 27
PS QUERY 101
Optional Prompt with Lookup List through the Add Criteria Icon – Simplified
Instructions ....................................................................................................................... 98
Date Prompt – Simplified Instructions.............................................................................. 98
Date Range Prompt – Simplified Instructions ................................................................... 99
Optional Numeric Prompt with No Lookup List – Simplified Instructions...................... 101
Prompt with wildcard (%)– Simplified Instructions ........................................................ 102
PS Query 101 Training Evaluation ............................................................................................................... 104
PS QUERY 101
Course Goal
The goal of this course is to empower Query Developers with the tools and skills needed to
create and manage basic Queries.
Page | 1
PS QUERY 101
Section 1 Introduction
Welcome to PeopleSoft Query! This versatile tool is simple to use and will allow Query Developers to
create Queries in an effective and efficient manner. In this section we will learn about relational
databases, the PeopleSoft Pillars being implemented and the proper protocol for Query
development.
At the end of this section you will:
Be able to explain how Relational Databases work for storing data.
Effectively employ Query creation and management protocol and conventions.
Define Query Terms and Definitions.
Checkout Flat File with Single Name, Address, Book and Due Date Information
First Name Last Name Address Phone Book Title Due Date
Jennifer Smith 13 Elm St 867-5309 Anne of Green Gables 6/28/2015
This flat database record works pretty well at meeting the basic need to keep track of who has
checked out which book, but it does have a few drawbacks in terms of efficiency, space
Page | 2
PS QUERY 101
required, and maintenance time. For example, each time Jennifer checks out another book her
contact information will have to be entered again and again.
Checkout Flat File Record with Multiple Name, Address, Book and Due Date Information
First Name Last Name Address Phone Book Title Due Date
Jennifer Smith 13 Elm St 867-5309 Anne of Green Gables 6/28/2015
1 Freebie
Jane Yellowrock 555-8267 Mercy Blade 7/1/2015
House Lane
Jennifer Smith 13 Elm St 867-5309 Anne of Avonlea 7/13/2015
This is less efficient and opens the database up to possible errors (maybe the phone number is
entered wrong). Therefore, instead of using flat database, multiple records can be used to
“have a place for everything and everything has a place” as shown in the two records below.
Page | 3
PS QUERY 101
So now all that is needed is a way to relate the two Records. The easiest way to do this is to use
a "Key Field", a field whose values uniquely identify the rows in the record. In the example
below, we have created a CUST_ID to identify each customer.
Customer Record with Multiple Name and Address Information (can be joined to other records
via the CUST_ID field)
CUST_ID First Name Last Name Address Phone
123 Jennifer Smith 13 Elm St 867-5309
1 Freebie House
456 Jane Yellowrock 555-8267
Lane
Checkout Record with Multiple Book and Due Date Information (can be joined to other records
via the CUST_ID field)
CUST_ID Book Title Due Date
123 Anne of Green Gables 6/28/2015
456 Mercy Blade 7/1/2015
123 Anne of Avonlea 7/13/2015
123 Anne of Windy Poplars 7/18/2015
Page | 4
PS QUERY 101
Pillars are comprised of modules where data is captured and stored. The list below is a
sampling of available Modules. For the complete list please see: Query Module List by Pillar
FS Asset Management AM
FS Accounts Payable AP
FS Accounts Receivable AR
FS Billing BI
FS Cash Management CM
FS Contracts CO
FS Expenses EX
FS General Ledger GL
FS Grants GR
FS Commitment Control KK
FS Project Costing PC
FS Purchasing PO
FS Projects PR
HC HR Core HR
HC Absence Management AB
HC Payroll PY
HC Time and Labor TL
HC Talent Acquisition Management TM
HC Benefits Administration BA
HC Faculty Workload FW
Page | 5
PS QUERY 101
Each pillar has its own relational database and it is important to note that standard queries
cannot cross pillar boundaries.
Page | 6
PS QUERY 101
o Any special cases where a prompt should not be used must first be approved by Data
Services.
Store in logical folder.
o Queries not stored in a logical folder will not be migrated.
Test your query for accuracy, performance and data validation.
o Use the Query Migration Form as a guide.
PS Query Terms
We have already studied in the section above the terminology associated with relational
databases and PS Query. Below is a more complete list of most of the terms that users will
come across in their experiences with PS Query. As PeopleSoft terminology is not always the
same as standard terminology it is important to understand their use and definition. As users
move further on in their training they will learn more terms unique to PS Query, however the
list below will provide a firm foundation.
Relational Database: A database system in which the database is organized and accessed
according to the relationships between data items without the need for any consideration of
physical orientation and relationship. Relationships between data items are expressed by
means of tables (records).
Record/Table: Records/Tables are the foundation of the query tool. A record stores data that is
arranged by rows (entries) and columns (fields). For example, a record/table containing data
about “people” would have a row for each individual person and columns (fields) for each piece
Page | 7
PS QUERY 101
of data stored for that individual (ex: name, address, phone). Records can be added to a query
from the “Records” tab.
Column/Field: In a database context, a field is the same as a column. For example, a record of
people could contain separate fields such as name, address, phone, etc.
Query: A query is a SQL SELECT statement that reads data from records and views within the
database, and returns the result set to the requester. PS Queries cannot change data within the
database.
SQL: Structured Query Language (SQL) is a language that provides an interface to relational
database systems. It was developed by IBM in the 1970s for use in System R. SQL is a de facto
standard, as well as an ISO and ANSI standard. Some people pronounce SQL "sequel".
Criteria: Specifying criteria in your query allows you to set conditions which limit the results
returned by the query to only those data that you are interested in. Criteria are viewed and
maintained on the “Criteria” tab. Example: You may want to set criteria to limit your query to
retrieve a relevant subset of data such as active undergraduate students as opposed to
returning results for all active students.
Join: The process of combining data from two or more records using matching keys.
Public Query: Public Queries are viewable and editable by any user with access to Query
Manager and the proper Record access. Public queries are available for use by many different
users, so please do not save any changes that you make to a public query.
Private Query: Private queries are only viewable by the individual who created the query. They
can be shared with others individually, however.
Key Field: A column in a record whose values uniquely identify each row. A key field value
cannot be NULL.
Page | 8
PS QUERY 101
Section 1 Review
In this section we learned about Relational Databases and how they work in efficiently storing
data for easy retrieval for reporting.
We also discussed important Query protocol and conventions ensuring effective Query
migrations, development and maintenance.
Finally we learned some helpful Query terminology ensuring all Query Developers are “on the
same page” and can “speak the same language”.
Question 2 1 pts
Traditionally in database terminology the term 'Table' is used to define a grouping of rows and columns of
data, however in PeopleSoft Query this grouping is referred to as a [what]?
☐ Key Fields
☐ Columns
☐ Rows
☐ All of the Above
Question 4 1 pts
Queries should normally be developed in which environment?
☐ PCD
☐ Production
☐ PDV
ace to move this question.
Question 5 1 pts
The correct naming convention is important because if queries in development in PCD do not begin with
DEV_ they could be [what] during the refresh process?
Page | 9
PS QUERY 101
Question 6 1 pts
Searching for an existing query before developing a new one will:
Question 7 1 pts
While the query description is only 30 characters, the query definition is limitless and should be used to track
various aspects of query creation including:
Detailed description of purpose of Query
Any specific criteria applied
Key search terms
Description of any changes or updates made to an existing Query
College code and email address of developer
Date Query was created or updated
Business Process Number, if applicable
Data that should be redacted per FERPA
Effective Dating Logic outside of the default. Specifically for:
o Describe Effective Dating logic (i.e. <= Term End Dates or <= Current Date)
o Is Effective Dating Logic joined on Term End Date for historical reporting?
o Is Effective Dating Logic aligned with Term Dates for prior term reporting?
☐ True
☐ False
Question 8 1 pts
Queries created by others are never okay to use, even if you “save as” to save the query to a new name.
☐ True
☐ False
Question 9 1 pts
If a query has a [what] the query will be usable by all colleges as the end user can select their college code.
Question 10 1 pts
Queries which are to be migrated should ALWAYS be saved as:
☐ Public
☐ Private
Page | 10
PS QUERY 101
Question 11 1 pts
A field in a record whose values uniquely identify each row.
☐ Key Field
☐ Relational Database
☐ Record
☐ Query
Question 12 1 pts
A database system in which the database is organized and accessed according to the relationships between
data items without the need for any consideration of physical orientation and relationship.
☐ Query
☐ Field
☐ Relational Database
☐ SQL
Question 13 1 pts
The foundation of the query tool. Stores data that is arranged by rows (entries) and columns (fields).
☐ Criteria
☐ Join
☐ Record
☐ Private Query
Question 14 1 pts
In a database context, this is the same as a column.
☐ SQL
☐ Record
☐ Relational Database
☐ Field
Question 15 1 pts
A SQL SELECT statement that reads data from records and views within the database, and returns the result
set to the requester.
☐ Relational Database
☐ Field
☐ Join
☐ Query
Page | 11
PS QUERY 101
Question 16 1 pts
Structured Query Language
☐ SQL
☐ Join
☐ Key Field
☐ Public Query
Question 17 1 pts
Set of conditions which limit the results returned by the query to only those data that you are interested in.
☐ Join
☐ Criteria
☐ Key Field
☐ Query
Question 19 1 pts
The process of combining data from two or more records using matching key fields
☐ Criteria
☐ Join
☐ Public Query
☐ Record
Question 20 1 pts
Viewable only by the individual who created the query. Can be shared with others individually, however.
☐ Public Query
☐ Criteria
☐ Join
☐ Private Query
pace to move this question.
Question 21 1 pts
Viewable and editable by any user with access to Query Manager and the proper Record access.
☐ Private Query
☐ Public Query
☐ Relational Database
Page | 12
PS QUERY 101
Section 2 Introduction
In this section we will utilize PS Query as we learn navigation and Query basics such as searching and
running Queries. The exercises provided at the end of this section are Pillar specific. Please do not
do all three sets of exercises, instead select the Pillar you work in and complete that set of exercises.
At the end of this section you will be able to:
Access PeopleSoft Query
o Viewer
o Manager
o Schedule Query
Search for existing Queries using Wildcards.
Run Queries to multiple outputs.
Page | 13
PS QUERY 101
Page | 14
PS QUERY 101
From this screen users are able to search using the Operator “Begins With” by multiple criteria
including:
Access Group Name – name of the query tree access group
Description – query description
Folder Name - search by folder name
Owner – private or public not the name of the query creator
Query Name - name of the query
Type - default is a User Query.
o User queries - Create and run queries to retrieve data from the database
o Archive queries - Define selection criteria to archive data from transactional tables to
history tables
o Process queries - queries that are intended to be run periodically by batch processes
o Role queries - queries that PeopleSoft Workflow uses to determine to whom to send
emails, forms, or worklist entries.
Uses Field Name – name of a field that is being used in the query.
Uses Record Name – name of a record that is being used in the query.
Click on the hyperlink "Advanced Search" to the right of the "Search" button in order to access
Advanced Search capability where even more search functionality is available including
different Operators such as:
<
<=
=
>
>=
Begins With
Between
Contains
In
Not =
Page | 15
PS QUERY 101
Note: Version 8.54 will not allow for downloading results to Excel or XML. Instead run the
query to HTML first in order to accomplish this. This error will be fixed with the next upgrade.
To view the results in a new tab, click on the “HTML” hyperlink from the results list. The results
will display in the new tab below the prompts.
TIP! When viewing the results in HTML you are able to, in essence, “re-run” the Query
without the need to retype in all the prompt information. Instead, you are able to make
Page | 16
PS QUERY 101
whatever changes you want directly from the new tab.For example, to quickly change the
selected Term – instead of having to re-input Institution and Term, just change the Term.
The new results will display after clicking “View Results”.
In addition there is an Advanced Search capability where even more search functionality is
available including different operators such as:
<
<=
=
>
>=
Begins With
Between
Contains
In
Not =
Page | 17
PS QUERY 101
Page | 18
PS QUERY 101
TIP! When viewing the results in HTML you are able to, in essence, “re-run” the Query without
the need to retype in all the prompt information. Instead, you are able to make whatever
changes you want directly from the new tab.
For example, to quickly change the selected Term – instead of having to re-input Institution,
Academic Career and Term, just change the Term. The new results will display after clicking
“View Results”.
Page | 19
PS QUERY 101
In addition Query Manager allows for users to take certain actions on Queries. To the left of
the list of results are checkboxes. One or multiple Queries can be selected.
You can then bring up the list of available actions by selecting the drop down menu from the
Actions field.
Page | 20
PS QUERY 101
The “Scheduled Query” page will come up with the query name previously selected already
filled in along with designating whether the query is Private or Public. If there is an existing Run
Control ID for the query it will display here.
If there is not an existing Run Control ID the Run Control ID will be blank. If there is an existing
Run Control ID then it will appear in the field. In the image below there is an existing Run
Control ID associated to this query by the user.
A Run Control ID is used to tell the system when and where and how you want the report to
run. For example, you might tell the system to run the report on the database server at 4 am or
Page | 21
PS QUERY 101
every Sunday afternoon, or you might tell it to run the report immediately. For most reports,
you must also set parameters that determine the content of the report, such as the business
unit or time period on which to report. These parameters are based on the prompts used in the
query and are saved by the Run Control ID so they don’t have to be re-entered each time you
use the Run Control ID to run the query. A run control is a database record that provides values
for these settings. Instead of entering the same values each time you run a query, you create
and save a Run Control with those settings.
There is no specific naming convention for the Run Control ID . Run Control ID’s have a 30
character limit and cannot be easily deleted. They are individual to each user and are not
visible by others. Run Control ID’s can be used for a single query to save the parameters or the
user can change the query associated with the Run Control ID.
If the Run Control ID field is not populated then create a new one by clicking on "Add a New
Value" tab, enter the Run Control ID and then click on the “Add” button.
The Schedule Query page will display. The query name will automatically populate based on
the query selected from Query Viewer or Query Manager. Enter a description for the query
Run Control ID in the Description Field. This will be the Report Name.
Note: if there are prompts (parameters) for the Run Control ID they can be updated here by
clicking the Update Parameters hyperlink. You can save these changes to the Run Control ID by
clicking “Save”. This will not, however, schedule the query. To schedule the query click on
“Apply”.
Page | 22
PS QUERY 101
The Process Scheduler Request page will display. Select the Time Zone, Date and Time to run
the query.
You will return to the Schedule Query page. Notice there is now a Process Instance number
now associated with this Scheduled Query.
PROCESS MONITOR
To view the status of your Scheduled Query click the “Process Monitor” hyperlink from the
Schedule Query page. The Process Monitor will display the status of the Scheduled Query.
Page | 23
PS QUERY 101
You are able to see the status of Scheduled Query runs by:
User ID
Type
Number of days past
Server
Name
Instance from and to
Run Status
Distribution Status
Another way to access the Process Monitor is through the menu path: Main Menu>
PeopleTools> Process Scheduler> Process Monitor
Once the query has run and you see a status of “Success” click on “Go back to Scheduled
Query”. This will return you to the very first Scheduled Query search page. Note that your Run
Control ID is now filled in so to get to the Scheduled Query page to view the report via Report
Manager click on "Enter". Click on the Report Manager hyperlink to view the query results.
REPORT MANAGER
To view the results of your Scheduled Query click the “Report Manager” hyperlink from the
Schedule Query page in order to access the Report Manager. You may need to click on the
"Administration Tab" in order to view the results of the scheduled query.
Page | 24
PS QUERY 101
Page | 25
PS QUERY 101
PILLAR:
CS – Search for and schedule the query QCS_TRAIN_STDNT_ENRL
HC – Search for and schedule the query QHC_TRAIN_LABWORK_3
FS – Search for and schedule the query QFS_TRAIN_CUSTOMER
ALL:
Run Control ID - Create the Run Control ID NAME_TRAIN_RUNID where NAME is your
first name
Description - Use a description of 'Schedule Exercise'
Type Use a type of 'Web'
Format Use a format of 'HTM'
INSTRUCTIONS:
Go to Query Manager or Query Viewer and search for the desired Query and click on the
"Schedule" hyperlink to the right of the query you would like to run.
The Query name will automatically populate based on the Query selected from Query
Viewer or Query Manager.
Click on the Add New Value tab and enter a Run Control ID.
Click on the “Add” button.
If there are prompts (parameters) in the query a pop up box will appear where they can
be filled in.
Enter a description for the Query Run Control ID in the Description Field. This will be the
Report Name.
Click Apply
Page | 26
PS QUERY 101
On the Process Scheduler page select the Time Zone, Date and Time to run the Query, if
desired. Also change the default output Type and Format, if desired
Click OK
Note the Process Instance Number
View the status of the run via Process Monitor by clicking on the hyperlink.
o When done viewing click "Go back to Scheduled Query" hyperlink.
o Note this will take you ALL the way back to the very beginning page where your
new Run Control ID will be already filled in for you. Click on Search again to go to
the Schedule Query page with the Report Manager and Process Monitor
hyperlinks.
o If you hit the back button it is possible for the "Go back to Schedule Query"
hyperlink from the process monitor page to disappear.
Alternately view the Process Monitor by navigating to Main Menu >
PeopleTools > Process Scheduler > Process Monitor
View the results of the report via Report Manager by clicking on the hyperlink. You may
need to click on the "Administration Tab" in order to view the results of the scheduled
query
o Click on the hyperlinked name of the report (the description entered earlier) in
the Report column.
o Click on the hyperlinked name of the query to download the results of the
scheduled query.
Alternately view the Report Manager by navigating to Main Menu >
Reporting Tools > Report Manager
If you finish the above exercise and would like to try to practice the simplified instructions for
an existing Run Control ID please feel free to use the Run Control ID created in the above
exercise and complete the exercise below as well.
Use the Run Control ID created in the previous exercise for this hands on exercise.
Page | 27
PS QUERY 101
INSTRUCTIONS:
Go to Query Manager or Query Viewer and search for the desired Query and click on the
"Schedule" hyperlink to the right of the query you would like to run.
The Query name will automatically populate based on the Query selected from Query
Viewer or Query Manager.
Click on Find an Existing Value and search for the Run Control ID.
Click on the the hyperlink for the Report Name or Run Control ID in the search results.
If there are prompts (parameters) in the Query a pop up box will appear where they can be
filled in. To update existing parameters click on Update Parameters.
Click Apply
On the Process Scheduler page select the Time Zone, Date and Time to run the Query, if
desired. Also change the default output Type and Format, if desired
Click OK
Note the Process Instance Number
View the status of the run via Process Monitor by clicking on the hyperlink.
o When done viewing click "Go back to Scheduled Query" hyperlink.
o Note this will take you ALL the way back to the very beginning page where your new
Run Control ID will be already filled in for you. Click on Search again to go to the
Schedule Query page with the Report Manager and Process Monitor hyperlinks.
o If you hit the back button it is possible for the "Go back to Schedule Query" hyperlink
from the process monitor page to disappear.
Alternately view the Process Monitor by navigating to Main Menu > PeopleTools
> Process Scheduler > Process Monitor
View the results of the report via Report Manager by clicking on the hyperlink. You may
need to click on the "Administration Tab" in order to view the results of the scheduled
query
o Click on the hyperlinked name of the report (the description entered earlier) in the
Report column.
o Click on the hyperlinked name of the query to download the results of the scheduled
query.
Alternately view the Report Manager by navigating to Main Menu > Reporting Tools
> Report Manager
Using PeopleSoft Schedule Query through the Schedule Query Menu Path
Schedule Query is used for scheduling a query to run at a future time or to run queries with
large results. Queries can be scheduled through Query Manager or Query Manager as well as
through the PeopleSoft Menu Path. The process varies slightly depending on whether the user
starts using the menu path or Query Manager/Manager.
Page | 28
PS QUERY 101
Navigate to the Schedule Query page by following this menu path: Main Menu > Reporting
Tools > query > Schedule Query
You will be brought to the page to search for an existing scheduled query via:
Description
Query Name
Run Control ID
If the query being searched for has an existing Run Control ID associated with it, the user will be
taken directly to the Schedule Query page after clicking search if there is only one Run Control
ID. If there is more than one Run Control ID a list will display where the user will select the
desired one by clicking on the hyperlink.
If there is not an existing Run Control ID then the message "No results found" will display and
the user will need to enter in a new Run Control ID. Note: this will entail entering the name of
the new Run Control ID before searching for the query to tie it to.
Click Add a New Value tab to create a new Run Control ID. Enter the new Run Control ID in the
Field. Once the Run Control ID has been entered click on the “Add” button.
The Schedule Query page will display. Search for the correct query and add a Run Control ID
description.
Page | 29
PS QUERY 101
Note: Clicking on “Save” will save the Run Control ID for the Scheduled Query request however
it will NOT schedule the query run. To schedule the query run, click on “Run”. Note that this is
different than when accessing Schedule Query through Query Manager or Query Manager
where the "Apply" button is selected to schedule the query.
The Process Scheduler Request page will display. Select the Time Zone, Date and Time to run
the query.
Click “OK”.
You will return to the Schedule Query page. Notice there is now a Process Instance number
now associated with this scheduled query.
Page | 30
PS QUERY 101
To view the status of your scheduled query click the “Process Monitor” hyperlink.
PROCESS MONITOR
To view the status of your scheduled query click the “Process Monitor” hyperlink from the
Schedule Query page. The Process Monitor will display the status of the scheduled query.
You are able to see the status of scheduled query runs by:
User ID
Type
Number of days past
Server
Name
Instance from and to
Run Status
Distribution Status
Another way to access the Process Monitor is through the menu path: Main Menu>
PeopleTools> Process Scheduler> Process Monitor
Once the query has run and you see a status of “Success” click on “Go back to Scheduled
Query”. This will return you to the very first Scheduled Query search page. Note that your Run
Control ID is now filled in so to get to the Scheduled Query page to view the report via Report
Manager click on "Enter". Click on the Report Manager hyperlink to view the query results.
REPORT MANAGER
To view the results of your scheduled query click the “Report Manager” hyperlink from the
Schedule Query page in order to access the Report Manager.
Page | 31
PS QUERY 101
Click on the hyperlink found in the Report column to view the output. Remember this report
'name' is the description entered when first scheduling the query.
Page | 32
PS QUERY 101
The query results can then be viewed in the selected format by clicking on the query Name in
the Name column.
PILLAR:
CS – Search for and schedule the query QCS_TRAIN_STDNT_ENRL
HC – Search for and schedule the query QHC_TRAIN_LABWORK_3
FS – Search for and schedule the query QFS_TRAIN_CUSTOMER
Page | 33
PS QUERY 101
ALL:
Run Control ID - Create the run control ID NAME_TRAIN_RUNID2 where NAME is your
first name
Description - Use a description of 'Schedule Exercise'
Type - Use a type of 'Web'
Format - Use a format of 'HTM'
INSTRUCTIONS:
Navigate to Schedule Query: Main Menu > Reporting Tools > query > Schedule Query.
Click on Add a New Value to create a new Run Control ID. Enter a Run Control ID.
Click on the “Add” button.
Enter the query name or search for the query.
Enter a description for the query Run Control ID in the Description Field. This will be the
Report Name.
If there are prompts (parameters) in the query a pop up box will appear where they can
be filled in. To update existing parameters click on Update Parameters.
Click Run.
On the Process Scheduler page select the Time Zone, Date and Time to run the query, if
desired.
Also change the default output Type and Format, if desired.
Click OK.
Note the Process Instance Number.
View the status of the run via Process Monitor by clicking on the hyperlink.
o When done viewing click "Go back to Scheduled query" hyperlink.
o Note this will take you ALL the way back to the very beginning page where your
new run control ID will be already filled in for you. Click on Search again to go to
the Schedule Query page with the Report Manager and Process Monitor
hyperlinks.
o If you hit the back button it is possible for the "Go back to Schedule Query"
hyperlink from the process monitor page to disappear.
Alternately view the Process Monitor by navigating to Main Menu >
PeopleTools > Process Scheduler > Process Monitor
View the results of the report via Report Manager by clicking on the hyperlink. You may
need to click on the "Administration Tab" in order to view the results of the scheduled
query
o Click on the hyperlinked name of the report (the description entered earlier) in
the Report column.
o Click on the hyperlinked name of the query to download the results of the
scheduled query.
Alternately view the Report Manager by navigating to Main Menu >
Reporting Tools > Report Manager
Page | 34
PS QUERY 101
If you finish the above exercise and would like to try to practice the simplified instructions for
an existing run control ID please feel free to use the query you just created a run control ID for
in the above exercise and complete the exercise below as well, time permitting. If there is not
time in class to complete both exercises please feel free to log in at any time to complete them.
INSTRUCTIONS:
Navigate to Schedule Query: Main Menu > Reporting Tools > query > Schedule Query.
Click on Find an Existing Value and select the correct Run Control ID
If there are prompts (parameters) in the query a pop up box will appear where they can
be filled in. To update existing parameters click on Update Parameters.
Click Run.
On the Process Scheduler page select the Time Zone, Date and Time to run the query, if
desired. Also change the default output Type and Format, if desired.
Click OK.
Note the Process Instance Number.
View the status of the run via Process Monitor by clicking on the hyperlink.
o When done viewing click "Go back to Scheduled query" hyperlink.
o Note this will take you ALL the way back to the very beginning page where your
new run control ID will be already filled in for you. Click on Search again to go to
the Schedule Query page with the Report Manager and Process Monitor
hyperlinks.
o If you hit the back button it is possible for the "Go back to Schedule Query"
hyperlink from the process monitor page to disappear.
Alternately view the Process Monitor by navigating to Main Menu >
PeopleTools > Process Scheduler > Process Monitor
View the results of the report via Report Manager by clicking on the hyperlink. You may
need to click on the "Administration Tab" in order to view the results of the scheduled
query
o Click on the hyperlinked name of the report (the description entered earlier) in
the Report column.
o Click on the hyperlinked name of the query to download the results of the
scheduled query.
Alternately view the Report Manager by navigating to Main Menu >
Reporting Tools > Report Manager
Page | 35
PS QUERY 101
Section 2 Review
In this section we learned how to access the three areas of PS Query:
PS Query Viewer
PS Query Manager
Schedule Query
We also learned how to efficiently search for existing Queries using Wildcards; how to output
Query results into different formats such as XLS, HTML or XML and some of the benefits of
viewing Query results in various formats. We also learned how to take actions on Queries such
as adding to a “Favorites” list.
Finally, we learned how to schedule a Query through Schedule Query as well as view the Query
results through this tool.
Page | 36
PS QUERY 101
Question 4 1 pts
Query Manager gives users the ability to:
☐ Create and Manage Queries
☐ Export Query Results
☐ Add Queries to Favorites
☐ Delete Queries
☐ Organize Queries into Folders
☐ All of the Above
Space to move this question.
Question 5 1 pts
What are the two symbols used in searching with Wildcards?
Question 6 1 pts
The percent sign replaces a of characters.
Space to move this question.
Question 7 1 pts
The underscore replaces a character.
Question 8 1 pts
Queries can be scheduled through Query Viewer, Query Manager or Schedule Query
☐ True
☐ False
Question 9 1 pts
A common reason to schedule a query is if the query has a large result set.
☐ True
☐ False
Question 10 1 pts
The Run Control ID is used to tell the system: [answer1], [answer2] and [answer3] the query is to be
scheduled.
Question 11 1 pts
The Process Monitor displays the [answer1] of the query run whereas the Report Manager displays
the [answer2]
Space to move this que on.
Page | 37
PS QUERY 101
2. Practice changing the prompts in the HTML output. Change the following:
Institution - WA220
Term – 2147
Career – CNED
List the number of results returned
3. Returning to Query Viewer, select Advanced Search and using the % Wildcard search for all
Queries in folders that begin with: Academic% How many Queries were returned:
4. Still in Advanced Search look for all Queries which use the Field Name DISB_PLAN. You may
practice using Wildcards in this search as well. How many Queries were returned:
5. Go back to Basic Search and look for and select any Query that begins with QC_ then add the
selected Query to your “Favorites”. List the name of the Query here:
7. Return to Query Manager and this time select to edit the Query
QCS_PAULA_STDNT_ENROLL_INSTIT. Save as a New Query and insert your name in for
Paula. Now Search for your Query in Query Manager and click the checkbox to the left to
select it and from the Action Tab choose to change the name of your Query. Change the
name to: QCS_SR_STDNT_ENROLL_”your initials” inserting your initials at the end of the
Query.
Page | 38
PS QUERY 101
2. Practice changing the prompts in the HTML output. Change the following:
Business Unit – HR220
List the number of results returned
3. Returning to Query Viewer, select Advanced Search and using the % Wildcard search for all
Queries in folders that begin with: Pay%
How many Queries were returned:
4. Still in Advanced Search look for all Queries which use the Field Name VENDOR_CLASS. You
may practice using Wildcards in this search as well.
How many Queries were returned:
5. Go back to Basic Search and look for and select any Query that begins with QH_ then add the
selected Query to your “Favorites”.
List the name of the Query here:
6. Navigate to Query Manager and search for QHC_PAULA_EMPL_BY_CO. Run the Query to
Excel. Use the following for the prompts:
Business Unit – HR220
Open the file in Excel. How many results were returned?
7. Return to Query Manager and this time select to edit the Query QHC_PAULA_EMPL_BY_CO.
Save as a New Query and insert your name in for Paula. Now Search for your Query in Query
Manager and click the checkbox to the left to select it and from the Action Tab choose to
change the name of your Query. Change the name to: QHC_HR_EMPL_BY_CO_”your
initials” inserting your initials at the end of the Query.
Page | 39
PS QUERY 101
2. Practice changing the prompts in the HTML output. Change the following:
Institution – WA170
List the number of results returned
3. Returning to Query Viewer, select Advanced Search and using the % Wildcard search for all
Queries in folders that begin with: Expen%
How many Queries were returned:
4. Still in Advanced Search look for all Queries which use the Field Name EXPENSE_TYPE. You
may practice using Wildcards in this search as well.
How many Queries were returned:
5. Go back to Basic Search and look for and select any Query that begins with QF_ then add the
selected Query to your “Favorites”.
List the name of the Query here:
6. Navigate to Query Manager and search for QFS_PAULA_VENDOR_LOC. Run the Query to
Excel. Use the following for the prompts:
SetID: WACTC
Location: 220
Open the file in Excel. How many results were returned?
7. Return to Query Manager and this time select to edit the Query QFS_PAULA_VENDOR_LOC.
Save as a New Query and insert your name in for Paula. Now Search for your Query in Query
Manager and click the checkbox to the left to select it and from the Action Tab choose to
change the name of your Query. Change the name to: QFS_AP_VENDOR_LOC_”your initials”
inserting your initials at the end of the Query.
Page | 40
PS QUERY 101
Section 3 Introduction
Section 3 will teach you the steps to use in simple query creation and provide an overview of the
Query Manager Tabs. You will then learn about joins in PS Query and how they work to link records
together. We will begin the discussion on criteria in PS Query and what they mean to queries as
well as how to improve query efficiency and use prompts instead of hard coded data. The exercises
at the end of the section will be pillar specific to give users the chance to use records from the pillar
they actually work in. This will re-enforce finding and using records which contain good information
- one of the key components in successful query development.
Creating Queries
Page | 41
PS QUERY 101
This will take users to the main query development page. There are 11 tabs available for use in
creating queries – for the purpose of this course we will discuss only the following tabs:
Records
Query
Prompts
Fields
Criteria
View SQL
Run
The other tabs are for more advanced developing in PS Query and will be discussed in other
trainings.
Page | 42
PS QUERY 101
Keeping in mind that a query is a compilation of fields, the first thing to do is to find the data
that is to be queried. Fields live in records so it follows that in order to query the correct fields
we must find the records they live in.
To do this we go to the Records tab (note that when "Create New Query" is clicked the system
will automatically take users to the Records tab). ***The purpose of the Records tab is to
provide a location where users are able to search for and select one or more records to use in
their queries. ***
SEARCHING RECORDS
There are two search options in the Records tab: Basic and Advanced. The basic search allows
the Operator “Begins With” and the options of:
Page | 43
PS QUERY 101
The advanced search allows multiple operators with the same options as the basic
search. Wildcards are available for use in both search types.
The Title Bar has some options available for how users would like to view the list.
Find – will go to the next available record with the search string
Page | 44
PS QUERY 101
From the list of records users are able to either "Add Record" or "Show Fields".
"Show Fields" will display the record and all the fields that comprise the record. Note that the
Key Fields are indicated with a Y in the Key column.
"Add Record" will take the user to the Query tab and allow the user to select which fields to use
in the query.
Note: Clicking “Return to Search” found at the very bottom of the record will discard the
current record selection and bring the user back to the search screen with no records
displaying. A pop up window will appear where users can confirm this action.
The Query tab is where all records being used in the query are displayed and fields to be used in
the query are selected. As this is a simple query only a single record is displayed in the image
below. However, if multiple records are selected they will all display in the Query tab. Expand
or collapse the record to view the fields within it by clicking on the folder icon to the left of the
record name. ***The purpose of the Query tab is to provide a location where all of the records
used in the query can be displayed and where fields can be selected to use in the query . ***
Page | 45
PS QUERY 101
Select the fields to use in the query by clicking in the checkbox to the left of the Field Name.
Tip! Click the A/Z icon in the upper right section of the screen to view the results
alphabetically!
Tip! Users are able to select or deselect all fields quickly and easily by clicking the "Check All" or
"Uncheck All" buttons.
Sometimes, there may be a need to remove a record from a query. In order to remove a record
from a query simply click on the minus sign to the right of the record name (to the right of the
Hierarch Join hyperlink).
Page | 46
PS QUERY 101
If a prompt has been created to be used in the query the Prompts tab will display the prompts
along with the option to edit the prompt. Users are also able to create prompts in the Prompts
tab. ***The purpose of the Prompts tab is to create and display prompts***
Please note that new prompts must be re-created for each new query. It is not possible to
create and save a prompt for use across multiple queries.
Once the fields to be used in the query have been selected we can then determine how those
fields should be displayed. ***The purpose of the Fields tab is to show a list of all of the fields
selected for the query and to determine how those fields should be displayed in the query
results***
Here we are able to reorder the display, determine sort order, change heading text and choose
translate values, where applicable. In addition, as developers continue their PS Query training
and learn about more advanced options they will find the Fields tab is where many advanced
functions are started.
Page | 47
PS QUERY 101
REORDER/SORT
Each field is numbered in the Column section and this number determines where the field will be
displayed in the list. To change the order, simply enter in the New Column section the number of
the column where to display the field.
Users are also able to select sort order from this screen. In the example to the left a “New
Order By” was selected to sort the results by Class Number in Descending Order and by Course
Career in the default Ascending Order
Had a previous sort order been determined it would be displayed in the Order
By column. Multiple sorts are possible simply by selecting 1 in the field for the first sort, 2 for
the second sort and so on. When finished, click "OK" to return to the Fields tab.
Next, let’s select a field that has an XLAT or Translate Value to edit. In the CS Pillar the record
STDNT_ENRL has fields with a Translate Value. In HCM the record HR_ACCTG_LINE has fields
with a Translate Value while is FS the CUSTOMER table is a good record to use for this
exercise. Click the “Edit” button next to the selected field.
Page | 48
PS QUERY 101
TRANSLATE VALUES
Translate Values are used for fields that are able to read their display values from a translate
table. The default is None which tells the system not use the translate table and to display the
non-translated value. For example, the Student Enrollment Status field default values are E and
D as shown here.
As this may not make sense to the final end user of the query it is possible to look up
the Translate Value and select a different option to display. In this example we will select Long.
Now when we run the query we will see the display values from the translate table which are
much more user friendly.
The Effective Date for Short/Long is more advanced functionality and will be covered in other training.
Page | 49
PS QUERY 101
There are three options to modify if the field has a Translate Value and only two options if there
is not a Translate Value.
No Translate Heading
Value Options
Aggregate
Page | 50
PS QUERY 101
The Heading box allows the user to select “No Heading”, “Short Heading” and “Long Heading”
or to type in a “Text Heading”. The default heading text will display in the Heading
Text field. This display will change based on the selection. For example, if “No Heading” is
selected then nothing will display in the Heading Text field.
In the example above “Text” was selected and “Student Enrollment Status” was manually
entered in the Heading Text field.
Aggregate is a more advanced functionality and will be covered, in other training classes and
manuals. It is used to apply aggregates to the data.
To remove a field from the query users can go back to the query tab and de-select the checkbox
next to the field to be removed or from the Fields tab click the "Minus Sign" icon next to the
selected field.
Page | 51
PS QUERY 101
***The purpose of the Criteria tab is to allow users a place to create and/or view criteria that
will refine the results of their Queries***
It is important to note that users are able to create criteria in the Query tab and the Fields tab.
The criteria used in the query however MUST display in the Criteria tab. For example, if a
prompt has been created but does not display in the criteria tab then the prompt will not
function in the query as expected. The prompt must be tied as criteria to the query.
In this tab, criteria may be re-ordered and/or grouped for more logical execution. For the
purpose of this class we will be using the criteria tab to create simple Filters and
prompts. More in depth training on the Criteria tab will be provided in other trainings.
Page | 52
PS QUERY 101
Now that the display options have been selected it is time to review the SQL coding. To do this,
simply click on the View SQL tab. ***The purpose of the View SQL tab is to allow users to
review the SQL statements being used in the query***
Run Tab
***The purpose of the Run tab is to allow users to view the results of the query***
Users are now ready to run the query and check how the results will display as well as how long
it takes to run. Make sure to save any changes to the query before running. Queries should not
take over 1 minute to run and most should run much quicker than that. In order to run the
query, simply click on the Run tab. This will automatically start the process. Users may receive
a pop up message stating that the query is returning too many results. Note though the
message implies that there are more than 50,546 rows it is actually a combination of rows and
columns that is assessed so it is possible to have only 30,000 rows of data returned and still
have this message appear. If this message displays the query will need to be scheduled in order
to retrieve the full result set.
Click "OK" to view the results however consider adding a prompt or other criteria to narrow
down the number of results.
Page | 53
PS QUERY 101
The results of the query will display. Each row is numbered and each column is labeled in the
way that was designated in the Fields tab. In addition any Translate Values will display as
indicated in the Fields tab.
Page | 54
PS QUERY 101
Save Button: Will bring up a pop up window where users enter details regarding the query the
first time it is clicked. Afterwards it will save any changes made to the query.
Save As: Will save the query as a new query. Brings up pop up window where details regarding
the query are entered.
New Query: Will take the user to the first screen of creating a new query.
Preferences: Allows the user to select to display the name and description of the fields used in
query or only the description wherever the fields are displayed. Also allows users to select or
deselect the functionality of PS Query that will auto-join on fields of the same name. The
default is to allow auto-join.
Properties: Displays the properties of the query. The Properties Page will also display the last
update time and user.
Publish as Feed: Allows for the query results to be published as a feed.
New Union: Allows for the user to create a union between two records. This functionality will
be discussed in the ctcLink PS Query 301 course.
For new queries simply click "Save". Please note: if the query is a modification of an existing
query select “Save As”. For more information on modifying existing queries please see
the QDLC course.
Users will be prompted to enter information regarding the query. Systematically required fields
are denoted with an *, however again, please see the QDLC course for additional details on
what fields are required per SBCTC Data Services policy.
Query Name - follow the QDLC convention for naming the query. Queries that do not follow
this convention could be deleted during environment refreshes or system upgrades.
Query Description - 30 character description of the query.
Folder - Folder the query should be assigned to.
Query Type - Leave the default type of "User".
Owner - Select private or public. Only public queries will be migrated.
Query Definition - detailed description of the query including developer's institution cod, email
address, creation date among other details. Please see the QDLCcourse for more information.
The Query Name and Description will now display at the top of every tab.
Page | 55
PS QUERY 101
NOTE: The Query Properties Page also found in the hyperlinked options at the bottom of the
screen looks almost exactly like the Save screen but it DOES NOT save the query. The "Save"
button must always be clicked in order to save any changes.
Not all of the stages must be completed and the order they are done in is completely up to the
Query Developer with the exception of adding a record and selecting fields.
Page | 56
PS QUERY 101
The exercises below are pillar specific. Select the pillar most worked in and complete the
exercise for that pillar.
RECORDS TO USE:
CS – Search for and use the record: STDNT_ENRL
HC – Search for and use the record: BENEF_PLAN_TBL
FS – Search for and use the record: CUSTOMER
FIELDS TO USE:
(Select as many other fields as you like but be sure to include the following fields):
CS: Select the fields: INSTITUTION and STRM as well as any other fields desired.
HC: Select the fields: SETID and PLAN_TYPE as well as any other fields desired.
FS: Select the fields: SETID and CUST_ID as well as any other fields desired.
SIMPLIFIED INSTRUCTIONS
Navigate to Query Manager.
Click on “Create New Query”.
This will take you to the Records tab where you will search for and select the record to
use in the query.
Go to the Query tab, select the fields from the selected record to use in the query.
Remember to expand the record if necessary.
Go to the Fields tab, make any edits to the display of the heading text, translate values,
field order or sort order.
Save Changes
Page | 57
PS QUERY 101
Join Types
There are two types of Joins used by PS Query:
Standard or Equivalent Joins
Left Outer Joins
Joins normally MUST have a Key Field in common to be effective. This means that if the base
record has a Key Field of Institution for example, the second record joined must also have the
Institution field if the user is joining the query based on institution.
Cartesian Joins
There is one other join type that will rarely, if ever be used. If there are no common Key Fields
between records then PS Query will join the records but the result is what is called a Cartesian
Join or a Cross Join. Each row of the first record is paired with ALL of the rows of the second
record. This will produce an overwhelming number of results and data that makes no
sense. Cartesian Joins are useful for load testing but should generally never be used outside of
that. A message box will appear letting the user know that there are no common fields on
which to join the two records.
In this case, the only thing allowed is to click "OK" to add the record to the query. Once it's
been added, simply go to the Query tab and remove the record by clicking the minus sign to the
right of the record name (found to the right of the Hierarchy Join hyperlink).
Page | 58
PS QUERY 101
Note: There are instances where records that do not have common Key Fields but do have
common fields are able to be joined. This is a more advanced process and will be covered in
other trainings/manuals.
Standard Join
Standard Joins link data only when a match occurs between the Key Fields. What this means is
that if record A has 10 rows of data when record B is joined to it, only rows that have data in
both Key Fields will be joined resulting in the possibility of not all rows in the record A being
displayed. Let’s take a look at what that means in real life query development. Our original
query returned 21,695 results.
Page | 59
PS QUERY 101
After performing a Standard Join to add the City and State to the query there are now 16,411
results as not all of the rows had matching City/State information.
The different Join types all have a purpose it is just important to understand exactly how they
work and what the data will reflect.
Outer Join
This Join type will always return all of the rows in record A. If there are non-matching fields in
record B then a value of NULL will be returned. In the example below 12,967 rows are returned
with our simple query.
After doing a Left Outer Join to add the Name the query results still display all 12,967 rows.
Page | 60
PS QUERY 101
Once a record has been added to the query users are able to see if there are any pre-defined
joins by navigating to the Query tab. To the right of the fields in the record users will see any
possible predefined joins.
A pop up window will appear with the option to select either Standard or Left Outer Join. Make
the selection and click "OK".
Page | 61
PS QUERY 101
Select the fields to add to the query from the new record. Note: Though PS Query will add join
criteria to the SQL code, it is not automatically added to the Criteria tab leaving the Query
Developer unable to modify this criteria.
Once a record has been added to the query users are able to see if there are any Hierarchy
Joins by navigating to the Query tab. In the upper right corner of the Chosen Records box users
will see a hyperlink for "Hierarchy Join". Click on the link to see the Hierarchy.
Page | 62
PS QUERY 101
Note that there is not an option to choose which type of join is being performed. All Hierarchy
Joins are Standard Joins. Select the fields to add to the query from the new record.
Also Note: Though PS Query will add join criteria to the SQL code, it is not automatically added
to the Criteria tab leaving the Query Developer unable to modify this criteria.
To complete an Any Join, once the first record has been added to the query simply return to the
Records tab where users can search for a different record to add. The list of results will now say
"Join Record" instead of "Add Record".
A pop up window will appear with the option to select either Standard or Outer Join Type.
Select the correct hyperlinked record to tell the system which base record to join the new
record to.
Page | 63
PS QUERY 101
In the example below we are joining PERSONAL_PHONE (record B) to the first record
STNDT_CAR_TERM (record A). Select the join type and click on the hyperlinked name of the first
record to complete the join.
Another pop up window will appear asking users to confirm the Auto Join Criteria. Click on
"Add Criteria".
Select the fields to add to the query from the new record (record B).
Note: Any Join will allow users to create a Cartesian Join. If a pop up window appears stating
that no join conditions were found then the two records do not share any common Key Fields
and should usually not be joined.
Also Note: The Any Join method will add the join criteria to both the SQL code and to the
Criteria tab allowing Query Developers to modify it.
Page | 64
PS QUERY 101
The purpose of this exercise is to give users the chance to practice creating a join. The video
below shows the steps for creating a join using the Any Join method. For this exercise we will
also use the Any Join method, which is the preferred method to use when creating joins.
INSTRUCTIONS
Create the join by navigating to the Records tab.
Search for the record to join to your query.
Select the hyperlink 'Join Record'.
Select to use either a Standard Join or a Left Outer Join Type.
Click on the hyperlinked name of the record which the new record will be joined to.
Select/confirm the Auto Join Criteria by clicking on "Add Criteria" button.
Save changes.
Joins should actually create criteria by stating that two records selected share common
fields. A typical join criteria would be that A.EMPLID = B.EMPLID. Meaning that the employee
ID from record A, must equal the employee ID from record B. Other criteria could be specific
institutions, terms, accounts, vendors, employees, etc. The criteria can be “hard coded”, which
Page | 65
PS QUERY 101
means that there is no choice available. For example, the query can be hard coded to only pull
results for institution WA220. Or prompts can be used as criteria to give the end user the option
to select which institution for which they would like to see results.
1. Navigate directly to the Criteria tab and click on the “Add Criteria” button.
2. Use the “Add Criteria” icon in either the Fields Tab or the Query tab.
Page | 66
PS QUERY 101
Criteria Properties
Here we see the options available for creating criteria.
Expression 1 Type
Expression 1
Condition Type (Operators)
Expression 2 Type
Expression 2
Criteria Belongs to (Only displays when a Left Outer Join has been selected)
WHAT - Expression 1 is WHAT you want to filter on; institution, term, state, etc.
HOW - The Condition Type is HOW you want to filter; equal to, greater than, less than, etc.
VALUE - Expression 2 is the comparison VALUE; institution WA171, term 2163, etc.
WHERE - "This Criteria Belongs To” tells the system WHERE to place the criteria in the SQL
code.
Page | 67
PS QUERY 101
EXPRESSION 1
To select WHICH field will be used for Expression 1 click on the "Magnifying Glass" icon in the
Choose Record and Field box.
If there is more than one record being used in the query, the user will have the option to "Show
Fields" from record A or from record B. Click on the hyperlink of the Field to use in the
Expression 1 box.
Page | 68
PS QUERY 101
CONDITION TYPE
The Condition Type determines how Query Manager compares the Expression 1 to the value in
Expression 2.
Page | 69
PS QUERY 101
The value in the selected record field falls between two comparison
Between
values. The range is inclusive.
The value in the selected record field exactly matches the comparison
Equal to
value.
This operator is different from the others, in that it does not compare a
Exists record field to the comparison value. The comparison value is a subquery.
If the subquery returns any data, the corresponding row is returned.
Greater Than The value in the record field is greater than the comparison value.
The value in the selected record field matches one of the comparison
In List
values in a list.
The value in the selected record field appears as a node in a tree created
with PeopleSoft Tree Manager. The comparison value for this operator is
a tree or branch of a tree that PeopleSoft Query should search.
In Tree
Note: PeopleSoft Query should not use trees that contain a combination
of dynamic details and range details. The results returned from trees with
this combination of details may be inaccurate.
The selected record field does not have a value in it. Users do not specify
Is Null a comparison value for this operator. Key fields, required fields, character
fields, and numeric fields do not allow null values.
Less Than The value in the record field is less than the comparison value.
The value in the selected field matches a specified string pattern. The
comparison value may be a string that contains wildcard characters.
Like
PeopleSoft Query also recognizes any wild-card characters that the
database software supports.
Page | 70
PS QUERY 101
EXPRESSION 2
Expression 2 can be a:
Field
Expression
Constant
Prompt
Subquery
For the purpose of this training we will discuss Field, Constant and Prompts. Expressions and
Subqueries will be discussed in subsequent trainings.
Field - Using Expression 2 as a field uses the data in the selected field as the comparison
Value. This is how Joins are able to relate two or more records. For example, the criteria
A.EMPLID = B.EMPLID is expressing as criteria that the field Employee ID from record A
must be the same as the field Employee ID in record B.
Constant - Using Expression 2 as a Constant allows the user to enter a specific value, for
example, a specific institution. This means the query will be developed for this
institution only.
Prompt - Using Expression 2 as a prompts allows the end user to select the value, for
example, from a list of institutions. This allows multiple users to use the same query as
they are each able to select different institutions.
The default for This Criteria Belongs To will be to add the criteria to the WHERE clause of the
SQL Statement. The field will only display in queries that have used a Left Outer Join. We will
go into further detail on this in the PS Query 201 course.
Page | 71
PS QUERY 101
Click "OK".
The new criteria have now been added to the query and only results for institution WA171 will
display when the query is ran.
Logical Operators tell PeopleSoft Query how to coordinate different criteria. When users link
two criteria with AND, a row must meet the first and the second criterion for PeopleSoft Query
to return it. When users link two criteria with OR, a row must meet the first or the second
criterion, but not necessarily both.
When the query includes multiple criteria, PeopleSoft Query checks the criteria according to the
rules of logic: it evaluates criteria that are linked by ANDs before those that are linked by ORs.
When all the criteria are linked by ANDs, this order always returns the correct results. When
users include one or more ORs, however, this is not always what is desired. See the example
below for clarification.
Page | 72
PS QUERY 101
This example shows the criteria settings for a list of customers who have an active status and
reside in Washington DC (DC) or customers who reside in Maryland (MD).
The set of criteria that was entered in the previous example returns a list of customers in
Washington DC (except those who are inactive) and ALL customers in Maryland (including those
who are inactive). This list results because PeopleSoft Query evaluates based on the order of
operations:
Parenthesis
AND
OR
It looks first for rows where the customer is active AND where the state is Washington
DC. Next it looks for results where the state is Maryland regardless of any other criteria.
What users really want PeopleSoft Query to search for are rows where the state is Washington
DC or Maryland AND where the customer type is inactive. That is, users want PeopleSoft Query
to evaluate the OR before the AND. To accomplish this task, add parentheses to the list of
criteria. When a list of criteria includes parentheses, PeopleSoft Query evaluates the criteria
inside the parentheses before the criteria outside the parentheses.
Using the Group Criteria button on the criteria page, insert the opening parenthesis just before
the field name and the closing parenthesis just after the comparison value.
Page | 73
PS QUERY 101
This record shows the Edit Criteria Grouping page with open and close parentheses in the Edit
Criteria Grouping section.
Match the order of operations number with the correct logical operator.
To use the “Add Criteria” icon navigate to the Fields tab or the Query tab. The icon appears to
the right of the Field name in the Query tab and in the column Add Criteria in the Fields tab.
Click on the “Add Criteria” icon next to the Field to be used for the criteria selection.
Page | 74
PS QUERY 101
The first thing users will notice is that there is no need to choose the Expression 1 Field as it will
already be automatically filled in by the system using the Field you just selected for the criteria
selection.
From this point on, the way to set up criteria follows exactly the same steps as the Criteria Tab
instructions. Users will select the Condition Type, Expression 2 and This Criteria Belongs to as
explained earlier in this section.
Page | 75
PS QUERY 101
INSTRUCTIONS
From the Criteria tab click on “Add Criteria” button.
Select Expression 1 Type of "Field"
Select the Field to use as criteria for Expression 1 by clicking on the magnifying glass icon
to search for the correct field.
All records used in the query will display with the record A fields defaulting in the
display. To select a field from another record simply click on the "Show Fields" button
to the right of the desired record.
Select the Condition Type.
Select the Expression 2 Type of "Constant".
Enter the Expression 2 value to use as the comparison value.
If using a Left Outer Join, select where the criteria belongs, either the WHERE clause or
on the clause of the Left Outer Join.
If the Expression 1 field is from record A use the WHERE clause.
If the Expression 1 field is from another record use the ON clause from the same record.
Click OK.
Select the Logical Operator for each criteria.
Group or Reorder the criteria as necessary.
Page | 76
PS QUERY 101
INSTRUCTIONS
From the Query tab or the Fields tab, click on the “Add Criteria” icon next to the desired
field.
The Expression 1 Type will default automatically to "Field".
The field used as the Expression 1 will be automatically populated.
Select the Condition Type.
Select the Expression 2 Type of "Constant".
Enter the Expression 2 value to use as the comparison value.
If using a Left Outer Join, select where the criteria belongs, either the WHERE clause or
on the clause of the Left Outer Join.
If the Expression 1 field is from record A use the WHERE clause.
If the Expression 1 field is from another record use the ON clause from the same record.
Click OK.
Select the Logical Operator for each criteria.
Group or Reorder the criteria as necessary.
The video below shows adding "hard coded" criteria to a query through both the Criteria
Tab and the Add Criteria Icon.
Page | 77
PS QUERY 101
CS
INSTITUTION - INSTITUTN_SCRTY
BUSINESS_UNIT - SP_BU_SF_OPRVW
FS
BUSINESS_UNIT - SP_BU_GL_CLSVW
SETID - SP_SETID_CLSVW
HC
COMPANY - VHC_CMPNY_SCRTY
BUSINESS_UNIT_GL - VHC_BU_GL_SCRTY
BUSINESS_UNIT_HR - -VHC_BU_HR_SCRTY
Creating Prompts
Prompts are a type of criteria. It can be somewhat confusing when first starting with prompts
because the flexibility of PeopleSoft allows for two ways of achieving the same goal. Let’s go
over the “big picture” of adding prompts.
Page | 78
PS QUERY 101
To summarize, there are two ways to add prompts to a query. Either navigate directly to the
Prompts Tab or, as prompts really are a just a specialized type of criteria, use the “Add Criteria”
From the Prompts tab click on the “Add Prompt” button. The Edit Prompt Properties page will
appear.
Page | 79
PS QUERY 101
A list of hyperlinked results will appear. The interesting bit here is that the list will be
comprised of matching fields from ALL records, regardless of whether the record was selected
Page | 80
PS QUERY 101
for the query or not. For the prompt to work the field selected MUST be a field from one of the
records used in the query, however the field does NOT have to be displayed in the results.
Click on the correct Field Name to select the field on which to place the prompt.
Page | 81
PS QUERY 101
Next, search for the correct record to add to the Prompt Table field to be used to provide a
lookup list to the end user. Search by clicking the "Magnifying Glass" icon under the Prompt
Table field. In this example, "Prompt Table" was selected as the Edit Type and the
INSTITUTN_SCRTY was selected as the record for the Prompt Table field.
Page | 82
PS QUERY 101
As there is already a prompt created you can select it from here by simply clicking on the
hyperlinked result.
Click OK.
Review the Criteria Tab to see that the prompt is now being used as part of the criteria for the
query. Note the prompt displays as a colon and the prompt number (:1). Prompts increase
incrementally. A second prompt would display as :2 in the Expression 2 column.
Page | 83
PS QUERY 101
A pop up window will appear displaying the prompt. Either enter the information in the Field
or click on the "Magnifying Glass" icon to see a list of options.
The query will run based on the information specified in the prompt.
Page | 84
PS QUERY 101
To use the “Add criteria” icon, navigate to the Fields tab or the query tab. The icon appears to
the right of the field name in the query tab and in the column Add criteria in the Fields tab.
Click on the “Add criteria” icon next to the Field you want to use for the prompt
selection. Expression 1 will already be automatically filled in by the system using the field just
selected. Select Prompt as the Expression 2 Type and choose the Condition Type. Now users are
able to either use a prompt already created by searching using the magnifying glass or create a
new prompt. Click on “New Prompt”.
Page | 85
PS QUERY 101
Note that the Field Name and Prompt Table have been automatically populated (however in
the example above the incorrect record has been automatically added to the "Prompt Table"
field.
It is very important to note that the selection for the Prompt Table made by the system is
NOT always accurate. In this example the TERM_TBL was selected automatically by the
system however the correct Prompt Table to use for the prompt to work is TERM_VAL_TBL.
If the prompt does not work correctly check the document: ctcLink PS Prompt Tables.
Make any changes and click "OK". This will take you back out to the Edit criteria Properties
page. Click "OK "again and then run the query.
A pop up window will appear with the first prompt of Academic Institution and the second
prompt of Term. This query has now been increased in value and longevity as users are able to
select which Institution and which term to display.
Users are able to start typing in the value for the prompt and the system will provide a list
based on the value typed in as shown below.
Page | 86
PS QUERY 101
Or users can click the magnifying glass to the right of the prompt to pull up the complete list of
values to select from as shown in the example below.
Required Prompt with Lookup List through the Prompts Tab – Simplified
Instructions
To create a prompt through the Prompts/Criteria tabs that must be filled in and can be selected
from a list of validated lookup values (2 Step Process):
Page | 87
PS QUERY 101
The purpose of this exercise is to give users a chance to create a prompt through the
Prompts/Criteria tabs. The exercise is broken down into two parts. The first part will guide the
user through the steps to add a prompt using the Prompts tab and then the second part will
walk users through adding the prompt at criteria.
Optional Prompt with Lookup List Through the Add Criteria Icon –
Simplified Instructions
This exercise will give users the opportunity to practice using the add criteria icon for prompts creation.
Page | 89
PS QUERY 101
INSTRUCTIONS
From the Fields or Query tab click on the “Add Criteria” icon next to the field on which to
add the prompt.
o The Expression 1 type will be updated to "Field" and value in the Expression 1 box will
be automatically populated with the name of the field selected in the first part of this
step.
Select the "Condition Type" of "Equal to"
Select “Prompt” for the Expression 2 Type.
Click on “New Prompt” hyperlink in the Expression 2 box.
For this exercise we will not make any changes to the:
o Type
o Format
o Unique Prompt Name
o Length
o Decimals
Change the "Heading Type" to Text
Add (optional) to the end of text in the "Heading Text" field to let the users know that the
prompt will be optional.
Select “No Table Edit” for the Edit Type.
Search for the correct record to use as a lookup list for the selected field by clicking on the
magnifying glass next to the "Prompt Table" field.
Click on the hyperlinked name of the correct record to use as the prompt table to select it.
o Use the "Prompt Tables to Use" document for a starting point in searching for the
correct record to use as a prompt table.
Check the "Optional" checkbox
Click “OK” to finish creating the prompt portion.
Click "OK" again to finish adding the prompt as criteria.
Course Review
The goal of this course was to empower Query Developers with the tools and skills needed to create
and manage basic queries.
The Objectives for this course were to give attendees the tools and necessary information to:
Be able to explain how Relational Databases work for storing data.
Effectively employ Query creation and management protocol and conventions.
Achieve familiarity with Query Terms and Definitions.
Access PS Query
o Viewer
o Manager
o Schedule Query
Search for existing Queries using Wildcards.
Page | 90
PS QUERY 101
To meet the Goal and Objectives we learned in Section 1 about Relational Databases and how they
work in efficiently storing data for easy retrieval for reporting. We discussed important Query
protocol and conventions ensuring effective Query migrations, development and maintenance. We
learned some helpful Query terminology ensuring all Query Developers are “on the same page” and
can “speak the same language”.
We also learned how to efficiently search for existing Queries using Wildcards; how to output
Query results into different formats such as XLS, HTML or XML and some of the benefits of
viewing Query results in various formats. We saw how to take actions on Queries such as
adding to a “Favorites” list and how to schedule a Query through Schedule Query as well as
view the Query results through this tool.
In Section 3 we learned how to find and utilize Records to create a simple Query and how to create
more complex Queries by utilizing Standard and Outer Joins. Finally, we saw how to use simple
Criteria to hard code filters in a Query and also how to make Queries more valuable by incorporating
Prompts.
Now get out there and have fun developing top notch Queries!
Page | 91
PS QUERY 101
Simplified Instructions
Find below all of the step by step instructions provided in this manual.
Page | 92
PS QUERY 101
o Click on the hyperlinked name of the query to download the results of the
scheduled query.
Alternately view the Report Manager by navigating to Main Menu >
Reporting Tools > Report Manager
Page | 93
PS QUERY 101
Scheduling through Schedule Query Menu Path – Simplified Instructions for Navigate to
Schedule Query: Main Menu > Reporting Tools > query > Schedule Query.
Click on Find an Existing Value and select the correct Run Control ID
If there are prompts (parameters) in the query a pop up box will appear where they can
be filled in. To update existing parameters click on Update Parameters.
Page | 94
PS QUERY 101
Click Run.
On the Process Scheduler page select the Time Zone, Date and Time to run the query, if
desired. Also change the default output Type and Format, if desired.
Click OK.
Note the Process Instance Number.
View the status of the run via Process Monitor by clicking on the hyperlink.
o When done viewing click "Go back to Scheduled query" hyperlink.
o Note this will take you ALL the way back to the very beginning page where your
new run control ID will be already filled in for you. Click on Search again to go to
the Schedule Query page with the Report Manager and Process Monitor
hyperlinks.
o If you hit the back button it is possible for the "Go back to Schedule Query"
hyperlink from the process monitor page to disappear.
Alternately view the Process Monitor by navigating to Main Menu >
PeopleTools > Process Scheduler > Process Monitor
View the results of the report via Report Manager by clicking on the hyperlink. You may
need to click on the "Administration Tab" in order to view the results of the scheduled
query
o Click on the hyperlinked name of the report (the description entered earlier) in
the Report column.
o Click on the hyperlinked name of the query to download the results of the
scheduled query.
Alternately view the Report Manager by navigating to Main Menu >
Reporting Tools > Report Manager
Page | 95
PS QUERY 101
Click on the hyperlinked name of the record which the new record will be joined to.
Select/confirm the Auto Join Criteria by clicking on "Add Criteria" button.
Save changes.
Page | 96
PS QUERY 101
Required Prompt with Lookup List through the Prompts Tab – Simplified
Instructions
Create the Prompt
From the Prompts tab click on the “Add Prompt” button.
Search for the field on which to place the prompt by clicking on the magnifying glass
next to "Field Name".
o Be careful which field is selected. A list of all fields that meet the search criteria
will display, regardless of the record the field lives in. Only fields that are in
records used in the query will work as a prompt for the query.
Once the field has been selected some data will fill in automatically based on the field
selection. In this case we will not make any changes to the:
o Heading Type
o Type
o Heading Text
o Format
o Unique Prompt Name
o Length
o Decimals
Select the “Prompt Table” edit type.
Look up the correct record for the "Prompt Table" field.
Leave the "Optional" checkbox unchecked and leave the "Default Value" box empty.
Click “OK”.
Page | 97
PS QUERY 101
Optional Prompt with Lookup List through the Add Criteria Icon –
Simplified Instructions
From the Fields or Query tab click on the “Add Criteria” icon next to the field on which
to add the prompt.
o The Expression 1 type will be updated to "Field" and value in the Expression 1
box will be automatically populated with the name of the field selected in the
first part of this step.
Select the "Condition Type" of "Equal to"
Select “Prompt” for the Expression 2 Type.
Click on “New Prompt” hyperlink in the Expression 2 box.
For this exercise we will not make any changes to the:
o Type
o Format
o Unique Prompt Name
o Length
o Decimals
Change the "Heading Type" to Text
Add (optional) to the end of text in the "Heading Text" field to let the users know that
the prompt will be optional.
Select “No Table Edit” for the Edit Type.
Search for the correct record to use as a lookup list for the selected field by clicking on
the magnifying glass next to the "Prompt Table" field.
Click on the hyperlinked name of the correct record to use as the prompt table to select
it.
o Use the "Prompt Tables to Use" document for a starting point in searching for
the correct record to use as a prompt table.
Check the "Optional" checkbox
Click “OK” to finish creating the prompt portion.
Click "OK" again to finish adding the prompt as criteria.
Page | 98
PS QUERY 101
Page | 99
PS QUERY 101
o For Condition Type select Between from the drop down list.
o For Choose Expression 2 Type select the Expr – Expr radio button.
o On Expression 2 – Define Expression click “Add Prompt”.
o Select and link the “From Date” Prompt.
o On Expression2 – Define Expression 2 click “Add Prompt”
o Select and link the “To Date” Prompt.
o "Save".
Page | 100
PS QUERY 101
Page | 101
PS QUERY 101
Page | 102
PS QUERY 101
Page | 103
PS QUERY 101
Page | 104
PS QUERY 101
Page | 105