Session B - Tips-Tricks Query Managers

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Session B - Tips & Tricks for Query Managers 10/24/19

Comm Lab 1-3

SESSION B

Tips and Tricks for


Query Managers
Rich Fayad (SDCOE) Tatiana Patton (SDCOE)
Sergey Malygin (La Mesa/Spring Valley)

Session Topics
• Welcome & Introductions (5 min)
• Query Manager Overview (2 min)
• Guest speaker: Sergey Malygin (15 min)
 “Adding Fields to an Existing HCM Query”
• Sergey Malygin (La Mesa-Spring Valley): Finding field and record names using PS
Utility Chrome Extension, filling out mapping fields table, and adding records and
fields to existing queries in QM Manager
• Tips & Tricks Examples (5 min)
• Expression Examples (5 min)
• Standard Join vs Left Outer Join Analogy (5 min)
• SQL Functions (3 min)
• Discussion: Favorite Tips & Tricks (5 min)
• Wrap up & Closing (5 min)

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Query Manager
Overview

Query Manager Overview


• Query Manager is a tool for developing queries that extract data
from the PeopleSoft Finance and HCM databases.
• Query Manager makes developing queries easier by automating
many of the steps you would normally take when manually creating
or typing SQL statements from scratch.
• Query Manager is not used for any kind of SQL updating, such as
adding, changing or deleting records from database tables; it is for
“selecting” data only.

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Adding Fields to an
Existing HCM Query
Guest Speaker:
Sergey Malygin, La Mesa Spring Valley

Adding fields to an existing HCM query


Task:
• Adding two fields from Job Data > Payroll
• Adding three fields from Job Data > Salary Plan

Solution:
• Finding field and records names using PS Utility Chrome Extension

• Filling out mapping fields table.


• Adding records and fields to existing queries in QM Manager.

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Job Data > Payroll

2019 PeopleSoft User's Conference | 10/24/19

Job Data > Salary Plan

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Creating Mapping Table

2019 PeopleSoft User's Conference | 10/24/19

Get PS Utility Name


1. Click on search button
2. Click on the requested field
3. Copy your PS utility field name

M_JOB_DATA_WRK_M_AM_AC
CR_HRS_FAC

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Get PS Utility Name


1. Click on search button
2. Click on the requested field
3. Copy your PS utility field name

JOB_SAL_ADMIN_PLAN

2019 PeopleSoft User's Conference | 10/24/19

Filling out mapping fields table

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Query Manager
Job record is there, M_JOB_DATA record is not there

2019 PeopleSoft User's Conference | 10/24/19

Adding Fields from JOB Record


• STEP
• SAL_ADMIN_PLAN
• GRADE

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Finding and Adding M_JOB_DATA


Record

2019 PeopleSoft User's Conference | 10/24/19

Adding Fields from M_JOB_DATA


Record
• M_AM_ACCR_HRS_FAC
• M_AM_WORK_DAYS

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Saving as a New Query

2019 PeopleSoft User's Conference | 10/24/19

Tips & Tricks


Examples

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Tips & Tricks Examples


One of the best Tips is to make sure you know and
understand the requirements for the query you are going
to create before you start building it in Query Manager.

The biggest mistake you can make is to start writing the


query without fully understanding the requirements.

2019 PeopleSoft User's Conference | 10/24/19

Tips & Tricks Examples

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Tips & Tricks Examples


• Prefix each query you create with NNN_XX where NNN is your
district’s 3-digit number and XX is a 2-character application
abbreviation, for example “PO” for Purchasing.
• Use version control as part of your query naming convention, for
example use v1, v2, v3 at the end of the query name.
• The Query Definition Property can be used to create a query
modification log for tracking all changes, including a list of who was
shared a copy of the private query.
• The Translation Table option can be used to load valid values in a
prompt’s drop-down list.

2019 PeopleSoft User's Conference | 10/24/19

Tips & Tricks Examples


• When creating a new query and you are not sure what fields are in a
record or table, build a query for that table only and select all fields.
• As you begin testing your query consider adding temporary Criteria
to select a specific record, such as a single employee id, vendor or
purchase order. This allows you to more easily verify your query's
results, because you will be looking at a smaller amount of data. Once
you feel comfortable with the query results, remove temporary
Criteria, run it for all records and verify results.
• A good testing technique when modifying an existing query is to run
a parallel test. In other words, run the current version, then your new
version and compare results.Your new query should match the
current one except for whatever changes you made.

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Expression
Examples

Expression Examples
• Arithmetic Add Expression
• ROUND Function
• SUBSTR Function
• CASE Function

For more information on these expressions as well as other expression


examples please refer to the Tips and Tricks for Query Managers
handout.

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Standard Join vs
Left Outer Join
Analogy

Standard Join vs Left Outer Join Analogy


You (1st table) and a friend (2nd table) decide to go to
Vegas for the weekend under a "Standard Join" situation.
A "Standard Join" means records must exist in both
tables in order to see any results.

You drive over to your friend's house, they can still go, so you're both going to
Vegas! Yay!

Now, suppose you drive over to your friend's house and they say "sorry, something
came up, I can't go“. Guess what? You don't get to go to Vegas either – boo-hoo.
Under a "Standard Join" both you (1st table) AND your friend (2nd table) must be
able to go to Vegas in order to make the trip.

2019 PeopleSoft User's Conference | 10/24/19

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Standard Join vs Left Outer Join Analogy


You (1st table) and a friend (2nd table) decide to go to
Vegas for the weekend under a "Left Outer Join" situation.
A "Left Outer Join" means records must exist only in the 1st
table in order to see any results.
In other words, if there is no match from the 1st table to
the 2nd table, all the data from the 1st table is still
returned, and nothing is returned from the 2nd table.
You drive over to your friend's house, they can still go, so you're both going to Vegas!
Yay!
Now, suppose you drive over to your friend's house and they say "sorry, something came
up, I can't go". Guess what? You get to go to Vegas without your friend – yay! Under a
"Left Outer Join" only you (1st table) must be able to go to Vegas. It does not matter
whether or not your friend (2nd table) can make the trip, you still get to go to Vegas.

2019 PeopleSoft User's Conference | 10/24/19

SQL Functions

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Structured Query Language (SQL)


Functions
• ADD_MONTHS • REPLACE
• CASE • ROUND (with numbers)
• CONCAT • SUBSTR
• CURRENT_DATE • TRANSLATE
• LENGTH • TRIM

Please see the Tips and Tricks for Query Managers handout for
more information about these SQL Functions.

2019 PeopleSoft User's Conference | 10/24/19

Discussion
What are your favorite Tips & Tricks for using
Query Manager?

PeopleSoft Conference 2019


Session B - Tips & Tricks for Query Managers 10/24/19
Comm Lab 1-3

Wrap Up & Closing


These slides and session notes are published
on the PeopleSoft Support website.
http://crc.sdcoe.net/peoplesoftconference

PeopleSoft Conference 2019

You might also like