0% found this document useful (0 votes)
50 views58 pages

Albertsons PSQuery Basic

This document provides an overview of PeopleSoft Query and how to use it. It discusses what PeopleSoft Query is, key terms, how the underlying relational database is structured with records and tables, and how to research fields and run existing queries. Procedures covered include searching for existing queries, creating new queries, selecting records and fields, adding criteria, and joining data from multiple tables. The document is an introduction for learning the basic functions and concepts of the PeopleSoft Query tool.

Uploaded by

sai rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views58 pages

Albertsons PSQuery Basic

This document provides an overview of PeopleSoft Query and how to use it. It discusses what PeopleSoft Query is, key terms, how the underlying relational database is structured with records and tables, and how to research fields and run existing queries. Procedures covered include searching for existing queries, creating new queries, selecting records and fields, adding criteria, and joining data from multiple tables. The document is an introduction for learning the basic functions and concepts of the PeopleSoft Query tool.

Uploaded by

sai rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 58

PeopleSoft Query Basic

PeopleSoft Query
Introduction
August 2018

1
Agenda
 What is PeopleSoft Query
– Relational Database
– PS Query Terms
– PeopleSoft HRMS Tables/Records
– Query Security
 Running Existing Queries
– Searching Existing Queries
– Existing Query Command Options
 Creating New Queries
– Organizing and Managing Queries
– Edit Existing Queries
– Selecting Records
– Adding Fields
– Ordering and Sorting Column Data
– Editing Field Properties
– Viewing Underlying SQL Code
– Filtering Output with Criteria
– Previewing Query Results
– Making a Query Distinct
– Saving Queries
– Adding a Runtime Prompt

 Working with Multiple Tables


– Implementing Standard Joins

2
What is PeopleSoft (PS) Query
 PeopleSoft Query or PS Query is an end-user reporting
tool that allows Query Developers to extract information in
the form of a query from the relational database, without
the need to write SQL (Structured Query Language)
statements. Queries can be simple or quite complex; they
may be used one time or repeatedly, as necessary.
Results can be displayed on a page or sent to Excel,
HTML, XML or scheduled to run at a later time. In its
simplest form a query is basically a compilation of data
from certain fields displayed in the way the user has
selected.

3
Relational Database
 A relational database is a way of storing information
that organizes data into tables. Though table is the
term traditionally used they are referred to as 'Records'
in PS Query and they consist of columns and rows
(imagine an Excel Spreadsheet). The columns
represent fields and the rows detail each instance of
stored information. For example, a column or field
name might be 'Name' while the row information would
hold ‘Karl', 'Sophia', 'Olivia', 'Drake', etc. Records can
be linked by creating a defined relationship. These
relationships enable you to retrieve and combine data
from one or more Records with a single Query. They
are based on key fields, or columns that uniquely
identify each row of data. If a database only has a
single record it is referred to as a flat database but if
there are two or more records which can be related it is
called a relational database.

4
PS Query Terms
 Below is a list of most of the terms that users will come across in their experiences with PS Query.
– 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 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.

5
PeopleSoft HRMS Tables/Records
 PeopleTools Tables – PeopleTools tables contain meta-data about the PeopleSoft applicaton.
– PSMENUDEFN – Menu Names
– PSPNLDEFN – Page Names

 PeopleSoft Control Tables - Control tables store information that is used to process and validate the
day-to-day business activities (transactions) users perform with PeopleSoft HCM applications. The
information stored in control tables is common and shared across an organization, for example,
master lists of customers, vendors, applications, items, or charts of accounts. By storing this shared
information in a central location, control tables help to reduce data redundancy, maintain data
integrity, and ensure that users have access to the same basic information. The information stored in
control tables is generally static and is updated only when fundamental changes occur to business
policies, organizational structures, or processing rules.
– COMPANY_TBL
– LOCATION_TBL

 PeopleSoft Transaction Tables - Transaction tables store information about the day-to-day business
activities (transactions) users perform with PeopleSoft HCM applications. The information stored in
transaction tables often changes and is updated more frequently than the information stored in control
tables
– JOB

 PeopleSoft Prompt Tables - Prompt tables are tables that are associated with fields on PeopleSoft
application pages and which display valid data values for those fields when a user selects a prompt or
search option. The data values stored in prompt tables are retrieved from control tables, transaction
tables, or other PeopleSoft tables

6
Looking Up PeopleSoft Records
 Look up Records using Entity relations diagrams (ERDs). This module is available in DEMO.
 Entity relations diagrams (ERDs) capture the relationships between, details of, and constraints
imposed on the data defined in these models. ERDs provide a visual representation of the
database.
 Demo - http://phvgqa88.safeway.com:10410/psp/HRPSQ4/EMPLOYEE/HRMS/?cmd=expire

• Navigate to : Data Models


•  Query  Query Manager​
• ​
• Navigate to a page that you
• want to see the Diagram and
Records
• A PDF will be create

7
Looking Up PeopleSoft Records - Continued
 In this example we used the Department Component

Department ERD

8
Researching Fields using Query Manager

• Navigate to : NavBar 
• Navigator​

9
Researching Fields using Query Manager - Continued

• Navigate to : Reporting Tools

10
Researching Fields using Query Manager - Continued

• Navigate to : Query

11
Researching Fields using Query Manager - Continued

• Navigate to : Query Manager

• Query Viewer can also be


used to run existing
Queries

12
Researching Fields using Query Manager - Continued

• Click Create New Query

• Type in Record Name (JOB)


• Click Search
• Click Show Fields

13
Researching Fields using Query Manager - Continued

• All the fields that belong to the


JOB record will be displayed

14
Query Security

 Query Access Group Trees


– Records are attached to Query Tree
 Permission Lists
– Tree and Records are attached to a permission
list
 Roles
– Permission Lists are attached to a Role
 User
– Roles are attached to a Users
 If a required record is not visible, contact
PeopleSoft Security

15
Running Existing Queries
 Search for an existing query or report in PS environment
– Better to use an existing query than develop a new one.
– Minimizes query clutter.
– Query is already in production so it reduces wait time for the end-user.
 Query Viewer enables you to: 
– Search for a query.
– Preview a query in the active browser window.
– Run a query and display results in a new browser window.
– Print a query.
– Schedule a query.

16
Existing Queries using Query Viewer

• Navigate to : Query Viewer

• Note: Query Manager can


also be
used to run existing
Queries

17
Searching Existing Queries using Query
Viewer (Wildcards)

• Type %SUPER%
• % is a wildcard meaning anything
with SUPER will be displayed
• Click Search

18
Searching Existing Queries using Query
Viewer (Advanced)
• Click Advanced Search

• Enter Record Name (JOB)


• Click Search

19
Searching Existing Queries using Query
Viewer (Advanced)

• You can also filter using other


commands

20
Existing Queries Command Options

• Run to HTML
• Run to Excel
• Run to XML
• Schedule
• Definitional References
• Add to Favorites

21
Existing Queries - Run to HTML

• Click HTML
• The below report
will run and
display in
browser
• Note that from
browser, report
can be
downloaded
• Excel
Spreadsheet
• CSV/Text File
• XML File

22
Existing Queries - Run to Excel

• Click Excel

• Click Open
• Below Excel
will open with
data from
Query

23
Existing Queries - Run to XML

• Click XML

• Click Open
• Below XML will
open in
browser

24
Existing Queries – Schedule (Will be
covered in Advanced)

• Click Schedule

25
Existing Queries - Lookup References
Use the Definitional References to Query page (QRY_DEFN_REF) to view all PeopleSoft definitional objects that use this particular
query as the data source. The results show the definition ID, definition type, and definition sub-types if they are available.
These object types are included in the Definitional References to Query page:
• BI Publisher (with the Report Definition or Data Source Definition subtypes)
• Connected Query
• Composite Query
• Pivot Grid
• PeopleSoft Search Framework
• Cube Builder, Cube Outline, and Cube Dimension
• Query Feed and Query Feed Template

• Click Lookup References


• The below screen will appear
• Listing definition ID and definition
• type

26
Existing Queries - Favorites

• Click Favorites

• My Favorite
Queries will
appear

27
Creating New Queries - Organizing and
Managing Queries
 Use standard naming convention.
The Name field is 30 characters.
– ABS_XX_XXXXXXXX
• ABS for Albertsons
– ABS_PY_XXXXXXXX
• PY – Payroll
• AM – Absence Management
• BN - Benefits
• HR – Human Resources
• LA – Labor Agreements
– Example: ABS_HR_HEADCOUNT
 Add description to query property.
– The Description field is 30
characters. Try to use a description
that will best identify the query and
will also facilitate searching

28
Query Manager

• Navigate to : NavBar 
• Navigator​
• Reporting Tools
• Query
• Query Manager

29
Edit Existing Queries

• Enter Query Name


• Click Search
• Click Edit

• Query Manager will display


• allowing user to edit

30
Creating New Queries – Selecting Records

• Click Create New Query

• Click Record Name


Drop Down for Search
Options

• Type in Person
• Click Record Name
• Click Search

31
Creating New Queries – Selecting Records
Advanced

• Click Advanced Search

• You can search by


• Record Name
• Description
• Users Field Name
• Access Group
Name

• Advance Filtering is
also available for each
type

32
Creating New Queries – Selecting Records

• First Enter Record Name


• Click Search
• Click Add Record

33
Creating New Queries – Adding Fields

• Click Check All - This


will add all fields to
query
• Click individual fields if
requirements do not
include all fields

34
Creating New Queries – Ordering and
Sorting Column Data

• Click Fields Tab


• Click Reorder / Sort
• Click required New Order
By
• Click Descending
• Click OK

35
Creating New Queries – Edit Field
Properties

• Click Fields Tab


• Click Edit beside the field
• Update Heading Text
• Click OK

• Note: Aggregates will


be covered in
Advanced

36
Creating New Queries – Viewing Underlying
SQL Code

• Click Query Tab


• Sql will appear

37
Creating New Queries – Filtering Output
with Criteria
• Click Criteria Tab
• Click Add Criteria

• Click Record
Lookup
• Select A.BirthDate

38
Creating New Queries – Filtering Output
with Criteria
• Click Condition
Type Dropdown
• Select “is not null”
• Click ok

• Select “is not null”


• Click ok

• Click ok

39
Creating New Queries – Filtering Output
with Criteria

• When Query is executed, it will


only display employees that
have a birthdate stored in the
field

40
Creating New Queries – Previewing Query
Results

• Click Run Tab

41
Creating New Queries – Making a Query
Distinct

• Click Fields Tab


• Click the Minus to
delete the field not
needed in the query

42
Creating New Queries – Making a Query
Distinct

• Click
Properties

• Click Distinct
• Click Save

43
Creating New Queries – Making a Query
Distinct

• Click Run Tab


• Only the Distinct
Birthdates will be
displayed

44
Creating New Queries – Saving Queries

• Click Save
• Enter Query Name
• Enter Query
Discription
• Choose Private or
Public
• Enter any notes in
Query Definition
• Click OK

45
Properties - Saving Queries
Query Types
 User Query - User queries retrieve data from the
database directly from Windows-based Query Designer
or the web-based Query Manager and Query Viewer
applications.
 Process Query - Process queries are queries that you
intend to run periodically using a batch process. Create
these automated batch processes using PeopleSoft
Application Engine and the Query API. For example, you
could write a query that returns any overdue receivables
and schedule a batch process to run the query once a
week.
 Role Query - PeopleSoft Workflow uses role queries to
determine to whom to send an email, form, or worklist
entry. A role query needs to return one or more role IDs
based on the data that has been saved on the page that
is triggering the routing.
 Archive Query - You can save a query as an archive
query if you have access to workflow queries that include
Archive Query, Role Query, and Process Query. These
queries are generally only used by the PeopleSoft Data
Archive Manager.
 This Training Session will only cover Query Type User.

46
Creating New Queries – Adding a Runtime
Prompt

• Click Prompts Tab


• Click Add Prompt

• Click Field Name


Lookup

47
Creating New Queries – Adding a Runtime Prompt to run
report for just one employee id continued

• Enter EMPLID
• Click Search
• Click EMPLID

• Update Heading Text if desired


• Click OK

• Click Save

48
Creating New Queries – Adding a Runtime Prompt to run
report for just one employee id continued

• Click Criteria Tab


• Click Add Criteria

• Click Record Lookup


• Select A.Emplid

49
Creating New Queries – Adding a Runtime Prompt to run
report for just one employee id continued

• Click Prompt
• Click the Prompt Lookup
• Select 1 = EMPLID
• Click OK

• Click Save

50
Creating New Queries – Adding a Runtime Prompt to run
report for just one employee id continued

• Click Run Tab


• Enter Employee ID
• Click OK
• Employee Record will be
displayed like below

51
Working with Multiple Tables
 Query Manager enables you to create queries that include multiple-table joins.
Joins retrieve data from more than one table, presenting the data as if it came
from one table. PeopleSoft Query links the tables, based on common columns,
and links the rows on the two tables by common values in the shared columns.
 Joins are what make relational databases relational. Using joins, you define
relationships among fields when you query the records, not when you create the
records. Because PeopleSoft records are highly normalized (they each describe
one kind of entity), you can easily use Query Manager to create joins.
 The procedure for joining tables differs depending on how the tables that are
being joined are related to each other.

o This Training will only cover Standard Joins. A Standard Join displays a record when the data exists
in both Records

52
Working with Multiple Tables –
Implementing Standard Joins

• Click Record Tab


• Enter Record
• Click Search
• Click Join Record

• Select Join filter and get


additional fields (Standard
Join
• Click A = Person

53
Working with Multiple Tables –
Implementing Standard Joins
• Click Add Criteria

• Click OK
Understanding Effective Date
Criteria -
The highest effective date
(and possibly sequence number,
if used) is less than or equal to
today's date (system date on
the server).
This will be covered further in the
Advanced Training

54
Working with Multiple Tables – Effective
Dated Rows

55
Working with Multiple Tables –
Implementing Standard Joins

• Click the fields to add

56
Working with Multiple Tables –
Implementing Standard Joins

• Click Run Tab


• Enter Employee ID
• Click OK
• Employee Record will be
displayed like below

57
Questions

58

You might also like