Presentation is loading. Please wait.

Presentation is loading. Please wait.

PeopleSoft Financials Advanced Query Training Financial Information Systems and Reporting Controller’s Division

Similar presentations


Presentation on theme: "PeopleSoft Financials Advanced Query Training Financial Information Systems and Reporting Controller’s Division"— Presentation transcript:

1 PeopleSoft Financials Advanced Query Training Financial Information Systems and Reporting Controller’s Division PS_FINANCIALS@gru.edu

2 Agenda Advanced Selection Criteria –Complex Conditions –Group / Reorder Criteria –Having Criteria Run-time prompts Aggregates Expressions Join records in a query Distinct Statement

3 Advanced Selection Criteria - Reminder with criteria With criteria, the query will only pull rows that meet the criteria that you specify For example, if you have criteria of Voucher Invoice Date is between 01/01/2015 and 01/02/2015 – you will only return the data that is highlighted:

4 Grouping/Reorder Criteria Think of your criteria as a mathematical equation, and how you would group parts of the mathematical equation. –(3 + 5) +2 = 3 + (5 + 2) Query Criteria is a Logical Grouping –Defaults to AND as the logical operator AND NOT, OR, OR NOT are available Use example query: ADV_QRY_TRAIN_GROUP_CRITERIA

5 Having Criteria The HAVING clause is used in combination with an Aggregate_Function field as query results. EXAMPLE: –If your query results includes the SUM of the Monetary_Amount for each Project_ID, some projects may have a total of zero. The query results would list these zero dollar rows. –Upon using the HAVING criteria that the SUM of Monetary_Amount is not equal (<>) to zero (0). Then the zero dollar rows will not appear in the query results. Use example query: ADV_QRY_TRAIN_HAVING_CRITERIA

6 Run-time Prompts By using prompts, you do not have to edit criteria every time you run a query Allows the use of Public queries that users can specify their own parameters/criteria when running the query

7 Run Time Prompts - Ways to create them 1.Through Edit Criteria Properties Page – when you add criteria using conditions Equal to, Less than, Greater than, Like, etc (not with between) 2.Through the Funnel+ icon on the Fields tab 3.Through the Funnel+ icon on the Query tab 4.Through the Prompts tab – when you are using criteria such as Between and In List

8 Aggregates Aggregate Functions summarize data: –Sum –Count –Min –Max –Average

9 Aggregate - Before Use example query: ADV_QRY_TRAIN_AGGREGATE

10 Aggregate -Perform On Fields tab by Posted_total_amount, click the Edit button In the Aggregate box, click the radio button by Sum, and click OK. Notice that Sum appears in the Agg Column

11 Aggregate - After

12 Expressions Expressions can be a combination of mathematical equations and fields that are developed on the Expressions tab. Expressions can be used as a field for query result output or for criteria fields. You can create expressions: –Under the Expression tab –When adding criteria

13 Expressions - EXAMPLE If you use the LEDG_KK_VW_BOR record and you sum the Posted Total Amount (Budget) subtract the Expended, Encumbered, Pre- encumbered amounts, you can write an expression to find the remaining amount. –The expression needs to be the same field type and length as the field used in the expression. (i.e., SNm25.3) Use example query: ADV_QRY_TRAIN_EXPRESSION

14 Joining Records in a Query Retrieve data from more than one record Specify criteria from more than one record In a Join, the Query Tool joins the records based on common fields, and links the rows on the records by common values in the shared fields

15 Join Records in a Query - What Record Do I Choose? PO_HDR JRNL_LN PROJECT KK_ACTIVITY _LOG VOUCHER

16 Join Records in a Query -PS Financials Key Records Document Available on University PeopleSoft Website at: –Lists key records for each module –Lists key (indexed) fields for each record –Lists exceptions and rules when using the record to make a query

17 Join Records in a Query - How to find a Record/Field to Use in Your Query Run the MCG_FIS_FIND_A_RECORD query –Page Name Prompt –To get the Page Name: Navigate to the page and Press Shift-CTRL-J The Query Output Includes: –Page/Panel Name –Page Label Text for Field on Page –Record Name –Field Number –Field Name

18 Join Records in a Query - Example of Common Fields

19 Join Records in a Query -Standard Join Jrnl_Header Jrnl_Ln Business_unit Journal_ID Journal_date Unpost_seq Fund_code Account Ledger Accounting_period Fiscal_year Joining Criteria Returns rows when thre is at least one match in both tables Use example query: ADV_QRY_TRAIN_STANDARD_JOIN

20 Join Records in a Query -Outer Join Jrnl_Ln Fund_code Invoice ID Joining Criteria Returns all records of one table, even if there are no matches in the other table Jrnl_ln_ref = Voucher_id Voucher Journal_ID Account Vendor ID Not all Journals have a voucher associated with it Use example query: ADV_QRY_TRAIN_OUTER_JOIN

21 Join Records in a Query -Outer Join Make an expression criteria statement with the table that does not have any matching records Take the table with the “extra” information (voucher), and add a (+) after the field name

22 SQL Tab PeopleSoft Query Tool is a tool in PeopleSoft Financials that creates a SQL script to run against the relational database. SQL (Structured Query Language) is a database computer language designed for managing data in relational database management systems. When having problems with queries, copy the SQL on the SQL tab and email to: PS_FINANIALS@gru.edu

23 Select Distinct Statement The DISTINCT clause allows you to remove duplicates from the query result set. To set the DISTINCT clause, click on the Properties hyperlink at the bottom of the query page, and Click in the Check Box by Distinct. Use example query: ADV_QRY_TRAIN_DISTINCT

24 How to Prevent Bringing Down PSFIN Production Only join three or less records together before testing your query to run. If you need more records joined, only add one at a time and test running per each additional record. DO NOT run query for an entire year or more of data on the entire institution’s data. –Use department specific criteria –Test running on one month’s worth of data, before many months.

25 QUESTIONS


Download ppt "PeopleSoft Financials Advanced Query Training Financial Information Systems and Reporting Controller’s Division"

Similar presentations


Ads by Google