Introduction to PeopleSoft Query. The University of British Columbia

Similar documents
QUERY USER MANUAL Chapter 7

Introduction. Prerequisite. Training Objectives

PeopleSoft (version 9.1): Introduction to the Query Tool

Basic Query for Human Resources

Searching and Favorites in Datatel Web UI 4.3

Query. Training and Participation Guide Financials 9.2

Access - Introduction to Queries

USING ODBC COMPLIANT SOFTWARE MINTRAC PLUS CONTENTS:

Chapter 4. Microsoft Excel

When you first start OneNote, it creates a sample notebook for you. You can use this notebook or quickly create your own.

University of Wisconsin System SFS Business Process RPT Basic PeopleSoft Query

Excel 2013 Next Steps

DAY 7: EXCEL CHAPTER 5. Divya Ganesan February 5, 2013

Process Document Creating a Query with Runtime Prompts. Creating a Query with Runtime Prompts. Concept

Microsoft Access 2010

User Manual Mail Merge

Microsoft Office 2010: Introductory Q&As Access Chapter 2

Microsoft Access 2013

Microsoft Access 2013

Veco User Guides. Grids, Views, and Grid Reports

The Streetscape User Guide Dynamic Watch List

Public-Private Dialogue

ICDL & OOo BASE. Module Five. Databases

General Features Agenda

SPREADSHEET (Excel 2007)

Microsoft Excel 2010

PM4 + Partners Knowledge Articles

The New York Society Library Presents:

Microsoft Office Illustrated. Using Tables

Microsoft Access XP (2002) Reports

Microsoft Access XP (2002) Queries

VUEWorks Report Generation Training Packet

1. AUTO CORRECT. To auto correct a text in MS Word the text manipulation includes following step.

Introduction to PeopleSoft Query Part II Query Manager

Microsoft Project 2007 Level 2. MICROSOFT PROJECT 2007 Level 2

STIDistrict Query (Basic)

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment.

INTRODUCTION... 1 UNDERSTANDING CELLS... 2 CELL CONTENT... 4

Access Intermediate

Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts. Microsoft Excel 2013 Enhanced

Exercise 1: Introduction to MapInfo

Microsoft Office 2010: Introductory Q&As Access Chapter 3

Océ Engineering Exec. Advanced Import and Index

THE EXCEL ENVIRONMENT... 1 EDITING...

Layout and display. STILOG IST, all rights reserved

Relativity. User s Guide. Contents are the exclusive property of Municipal Software, Inc. Copyright All Rights Reserved.

Microsoft Excel 2010 Tutorial

Introduction. Table Basics. Access 2010 Working with Tables. Video: Working with Tables in Access To Open an Existing Table: Page 1

Space Information and Management System (SIMS) 4.0 User s Guide

Open. Select the database and click. Print. Set printing options using the dropdown menus, then click the

Working with Tables in Word 2010

Working with Data in Microsoft Excel 2010

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

Microsoft Word 2003 for Windows, Part 2

Easy Windows Working with Disks, Folders, - and Files

Human Resource Management System User Guide

Access 2003 Introduction to Report Design

Advanced ARC Reporting

Microsoft How to Series

Business Insight Authoring

Exploring Microsoft Office Word 2007

Microsoft Access Lesson 3: Creating Reports

Using Microsoft Access

Using Parameter Queries

Work expectations will be included in your appraisal during the Recognition Phase of the performance management process.

SECTION 4 USING QUERIES. What will I learn in this section?

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Microsoft Excel 2010

Access Intermediate

Excel Module 7: Managing Data Using Tables

New Perspectives on Microsoft Excel Module 5: Working with Excel Tables, PivotTables, and PivotCharts

eschoolplus+ Cognos Query Studio Training Guide Version 2.4

Week 5 Creating a Calendar. About Tables. Making a Calendar From a Table Template. Week 5 Word 2010

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

BRF_Financials_Query_9_1

Getting started with Ms Access Getting Started. Primary Key Composite Key Foreign Key

Tabs, Tables & Columns

Complete Quick Reference Summary

JF MSISS. Excel Tutorial 1

Creating a Spreadsheet by Using Excel

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201

Microsoft Access Illustrated. Unit B: Building and Using Queries

SOFTWARE SKILLS BUILDERS

Advisor Workstation Training Manual: Working in the Research Module

Business Warehouse reports Running and manipulating reports. Newcastle University Andy Proctor 9 th March 2017

Guide to User Interface 4.3

Data Grid Utilities - Searching Data Grids

Sostenuto 4.1 title page. System Management User s Guide

FOCUS ON: DATABASE MANAGEMENT

Getting Started With the Cisco PAM Desktop Software

DATABASE MANAGERS. Basic database queries. Open the file Pfizer vs FDA.mdb, then double click to open the table Pfizer payments.

BusinessObjects Frequently Asked Questions

WebIntelligence. Creating Documents

Microsoft Word 2013 Working with tables

Microsoft Access 2013

Component Templates. The Component Template Item Type. Modified by Jason Howie on 31-May-2017

Navigate to Cognos Cognos Analytics supports all browsers with the exception of Microsoft Edge.

Microsoft Access XP Queries. Student Manual

Chapter 4: Single Table Form Lab

course notes quick reference guide

Transcription:

Introduction to PeopleSoft Query The University of British Columbia December 6, 1999

PeopleSoft Query Table of Contents Table of Contents TABLE OF CONTENTS... I CHAPTER 1... 1 INTRODUCTION TO PEOPLESOFT QUERY... 1 Understanding Query... 1 Types of Queries... 1 CHAPTER 2... 2 USING QUERY... 2 The Query Window... 2 The Component View... 3 The Designer View... 5 CHAPTER 3... 6 CREATING SIMPLE QUERIES... 6 Selecting Record Components... 6 Viewing Selected REcords and Fields... 7 Selecting Field Components... 7 SPECIFYING SELECTION CRITERIA... 9 CHAPTER 4... 13 SET PREFERENCES... 13 Check or Change View Preferences... 13 Default View Preferences... 13 General View Preferences... 14 Component View Preferences... 14 Designer View Preferences... 14 CHAPTER 5... 16 FORMATTING QUERY OUTPUT... 16 Formatting Options... 16 Translate Table Values... 18 CHAPTER 6... 19 RUNNING QUERIES... 19 Running Queries... 19 CHAPTER 7... 20 QUERY MAINTENANCE... 20 Saving Queries... 20 Printing Queries... 20 Deleting Queries... 20 University of British Columbia 10/16/99 Page i

PeopleSoft Query Introduction CHAPTER 1 Introduction to PeopleSoft Query Understanding Query The main reason you store your business data in a database is so you can manipulate it to answer questions and solve business problems. Getting just the information you need can often be a difficult and time-consuming process. With PeopleSoft Query you can extract the precise data you require. The queries can be as simple or as complex as necessary and they can be one-time queries, or queries you will use repeatedly. Types of Queries You create queries to extract the data you need from the database. Since there are many reasons you might need data, there are many ways you can use queries: Display data in a grid control (on the Results tab). You can run queries within Query itself, displaying the results set in a grid control for review. This option is useful as you define and refine your queries. Provide input into a spreadsheet or Crystal Report. Query can seamlessly pass data to Microsoft Excel or Crystal Reports Pro. From there, you can use the features of these products to create polished reports. Search for records. Many of the search dialog boxes in PeopleSoft applications allow you to open Query and create a search query based on sophisticated search criteria. Create views. Queries can be used in the Application Designer to generate views. Using queries instead of SQL has two big advantages: you can use the PeopleSoft Query to generate the SQL text for your view, and the SQL that is generated is database independent. Check the database for conditions that trigger workflow events. Using PeopleSoft Workflow, you can specify that certain conditions for example; the presence of overdue receivables cause the system to send an e-mail to someone or put an entry in someone s worklist. You write queries to detect these conditions, then you schedule database agents to run them periodically. University of British Columbia 10/16/99 Page 1

Using Query PeopleSoft Query CHAPTER 2 Using Query The Query Window The Query window is split into the Component View (on the left) and the Designer View (on the right). Component View Designer View Adjust the relative size of either view by dragging the divider bar. View text in components that is cut off by the divider bar by placing the mouse pointer over the item. No clicking is necessary. Page 2 10/16/99 University of British Columbia

PeopleSoft Query Using Query The Component View The component view provides access to tables in the database. The component view has two tabs: Database and Query. Pay attention to which tab is active as you work; they look very similar. THE DATABASE TAB Gives you a list of available tables. You can view these tables as either a tree of access groups (see figure on page 2) or an alphabetical tree of tables to which your operator ID has access. COMPONENT VIEW ICONS Database name (displayed in the database component view only) Query name and public/private status (displayed in the query component view only) Table Table hierarchy or related record hierarchy University of British Columbia 10/16/99 Page 3

Using Query PeopleSoft Query Related table Field Key field Field having a related record Key field having a related record Expressions (the part of the query that contains individual expression components) An expression component (a single expression that has been defined as part of the query) Prompts THE QUERY TAB Displays all the components used in the current query. Components consist of tables, fields, prompts, expressions, and so on. Component View Designer View Page 4 10/16/99 University of British Columbia

PeopleSoft Query Using Query The Designer View The designer view is where you see the fields, criteria, and other details associated with the current query. The designer view has four tabs. Fields displays the fields you select for the query. Criteria allows you to set limits and conditions for the query. SQL shows the SQL code generated from the fields and criteria. Results displays the query results. University of British Columbia 10/16/99 Page 5

Creating Simple Queries PeopleSoft Query CHAPTER 3 Creating Simple Queries Selecting Record Components The first step in creating a query is to select the database tables that hold the data you want. In Query, the tables are referred to as record components, since they are one type of component of your query. For clarity, we call the components tables, which is what they in fact are. All operations on a table are performed from the Edit menu. First, select a table from the tree; then select an operation to be applied to that table from the Edit menu. OR OR OR There are several ways to select the table you want: Click the Database tab in the component view. Double click the desired table name (not the + sign). Drag the table from the Component View (on the left) to the Designer View (on the right). Right-click on the table name and select Add from the pop-up menu. Highlight the table name and select Edit menu, Add. If this is not the first table in the query, the menu option will read New Join to indicate a join operation. (Note: To use the Edit menu, you must first highlight a component in the Component View). Once you have selected a record component, Query automatically switches the component view from the Database tab to the Query tab to show the new record component that was added to the query. The designer view may or may not show fields, depending on how you have specified your view preferences. If you have selected the record component for an effective-dated table, Query displays a dialog box asking you how you want to handle the effective dates in the query. Page 6 10/16/99 University of British Columbia

PeopleSoft Query Creating Simple Queries Viewing Selected REcords and Fields At the top of the query component tree is the table you selected, along with a letter, followed by the fields comprising the record. Query uses the letter as an alias for the table name. This prefix is a shorthand way of indicating which table contains this field. The first table you select will appear as record A, the second as record B, and so on. Selecting Field Components Once you have selected the tables that hold the data you want, select specific fields from the tables. OR Click the Query tab in the component view. Double click the field you want to select. Drag and drop the field into Designer View. Notice what happens in the Designer View. With the Fields tab active, a number appears in the first column (Col), indicating the order of the fields in the query results. Query adds columns in the order to you select the fields the first field you select will appear as column one, the second as column two, and so on. You can select fields in any order; you don t need to use the order from the record component. Or you can change the order of the fields later. CHANGE ORDER OF FIELDS Right-click on the row that contains the field you want to move. University of British Columbia 10/16/99 Page 7

Creating Simple Queries PeopleSoft Query Select Column Number from the pop-up menu. Enter new column number in the dialog box. Click OK. Query renumbers the remaining fields to reflect the new column order. REMOVE A FIELD Double click the field in the Col column. OR Right click the field and click Select from pop-up menu. Query removes the field from the query and renumbers the remaining fields. The Designer View can show the fields from one or all of the record components you have selected. Again, this depends on your view preferences. However, you can always tell which table a field comes from by looking at its prefix (A, B etc.). Page 8 10/16/99 University of British Columbia

PeopleSoft Query Creating Simple Queries Specifying Selection Criteria Because PeopleSoft database stores data in tables, you can identify every individual piece of data by saying what column and row it is in. When you create a query, you pick the data you want by specifying which columns and rows you want the system to retrieve. You select which rows of data you want by adding selection criteria to the query. (For example, suppose you needed the names of all Bookstore customers who are not UBC employees. You start by creating a query that retrieves the Name and Company fields from the Customer table. Then you add a selection criterion that tells Query to scan for rows where the Company name is not UBC.) In most cases, you don t want every row of data from the table specified in your query, just the rows that meet certain conditions. To specify the conditions you apply criteria to the field(s). SET SELECTION CRITERIA Click the Criteria tab in the designer view. This panel displays one row for each query criterion. Click the Query tab at the bottom of the component view, and then scroll to the field you want. Select the field. Drag the record field on to the Criteria tab in the designer view. Note: If you double click a field it will be added to the Fields tab not the Criteria tab. CRITERIA TAB The Criteria Tab has four columns: Logical: Any rows after the first row must include either AND or OR logical value. These are in addition to other criteria. The default is AND. Expression: In most cases, the left-hand expression will be a field whose value you want to base the selection criterion on. Operator: See page 10. Expression: See page 11. University of British Columbia 10/16/99 Page 9

Creating Simple Queries PeopleSoft Query In the Operator column, click the down arrow and select an expression from the drop-down box. (The equal to operator is the default.) SELECTING OPERATORS Operator What it does Equal to Greater than Less than In list Between Exists Like Is null In tree The value in the selected record field exactly matches the comparison value. The value in the record field is greater than the comparison value. The value in the record field is less than the comparison value. The value in the selected record field matches one of the comparison values in a list. You select the value type by rightclicking in the second Expression column. The value falls between two comparison values. The range is inclusive. This operator is different from the others in that it does not compare a record field to the comparison value. The comparison value is a subquery. This will be covered in the Advanced Query workshop. The value matches a specified string pattern. The comparison value may be a string that contains wildcard characters.* The selected record field does not have a value in it. You do not specify a comparison value for this operator. The value appears as a node in a tree created with the Tree Manager. *Wildcards Query recognizes these wildcard characters: % matches any string of characters. E.g. C% matches anything starting with C, including C alone. _ matches any single character. E.g. _ones matches any five-character string ending with ones such as Jones, cones. Note: To use % as a literal character enclose it with \ as: percent\%\ Note: It is always better to use the not version of an operator than to use NOT operator in the Logical column. Note: The Criteria field does not have to be one of the fields you select for the query output. Page 10 10/16/99 University of British Columbia

PeopleSoft Query Creating Simple Queries ENTERING COMPARISON VALUES There are two Expression columns, one to the left of the Operator column, and one to the right. You normally do not have to change the left-hand Expression column it contains the field name. If the right-hand Expression column is not visible, use the horizontal scroll bar at the bottom of the designer view to scroll to it, or resize the window so both left and right hand expression columns are visible, or resize the columns. Right-click in the right-hand Expression column. What you select depends on what kind of value you are entering. Value Type What it does Field Expression Constant Subquery Prompt In List Current Date Tree Option Effective Seq A value in another field, usually a field in another table. An expression you enter. Query evaluates the expression once for each row it tests. A single fixed value. Data returned by a subquery. Advanced Query workshop. You will enter a value in a dialog box. This value type is available only when the selected operator is in list or not in list. The current date on the database server. A selected set of tree nodes. This value is available only when the selected operator is in tree or not in tree. Used on some effective-dated records. Advanced option Select operator from the pop-up menu, and type your value in the dialog box that appears. University of British Columbia 10/16/99 Page 11

Creating Simple Queries PeopleSoft Query Continue setting criteria for any other field. Ensure that your Operator and Expression values are what you want. Note that the Logical column defaults to a value of AND when you have more than one criteria expression. Take care when you change this value to ensure that the results reflect what you want. Note that some of the Operators may interfere with the Logical expression when it is other than AND. Page 12 10/16/99 University of British Columbia

PeopleSoft Query Set Preferences CHAPTER 4 Set Preferences What you see in the component view and the designer view often depends on what Preferences have been defined for your Query. Check or Change Preferences Select View menu, Preferences. The Preferences dialog box includes three tabs labeled General, Component View, and Designer View. Default View Preferences View Preferences Tab General Component View Designer View Show User Queries Show Access Groups Default Values Show Fields in Select List Sort Fields by Col Order Don t run query when Result tab is clicked Don t show row headers in Result tab Whenever you change view preferences, the new settings are saved in Windows and are retained from one Query session to another. University of British Columbia 10/16/99 Page 13

Set Preferences PeopleSoft Query General View Preferences The General view preferences enable you to select a Name Style and to specify File List Options. The Name Style determines whether field components appear with both their field name and description or with the description only. The three File List Options determine which type of query is displayed in the Open Query dialog box. Component View Preferences The Component View preferences tab allows you to turn the Show Access Groups option on or off. In the Database Component view, you will see either access groups or an alphabetical list of tables (records) to which you have access. Designer View Preferences The Designer View tab controls which fields you see when building your query and in what order they appear. You can combine the Designer View options to display the fields in the way that best suits your query needs. RESULT TAB These options determine whether or not to Show Row Headings on the Result tab. You can use the Run query on tab select option to automatically run the current query anytime the user clicks the Result tab. SHOW FIELD These buttons specify what fields appear in the designer view. In Record displays all the fields in the table that is highlighted in the component view. Even if you have selected more than one table in your query, you only see the fields in the highlighted table. In Select List displays only those fields selected for output data in the entire query. In Order By displays all the fields in the entire query that control the order of the output rows. With Criteria displays only those fields in the entire query that have selection criteria associated with them, no matter which record is selected in the component view. If no fields have criteria, then no fields are shown. All shows all the fields which the query will use for its result, including those which may not have been selected, but which contain criteria. Page 14 10/16/99 University of British Columbia

PeopleSoft Query Set Preferences SORT FIELDS BY This determines the order of the fields in the designer view. You can use any Sort Fields By option with any Show Fields option. Record Field displays fields in the order they appear in the record component(s). If your query uses fields from more than one record, the fields from record A are sorted before those of record B and so on. Col Order displays the fields in the query in the order they will be displayed in your output. This is the default Sort Field Option. When Col Order view option is active, you can change the column order by dragging and dropping the field rows. Field Name displays the fields in alphabetical order, no matter where the field came from. Order By Number places at the top of the list those fields selected to order the output rows, followed by the rest of the fields in record order. The Ord column shows which fields you have selected for ordering. University of British Columbia 10/16/99 Page 15

Format Query Output PeopleSoft Query CHAPTER 5 Formatting Query Output Once you have selected the fields to include in the query, you are ready to format the query output. Formatting Options You can make some decisions about the format of the Query output. To display or change currently assigned formatting: Right-click anywhere on the field in the Designer View, Fields tab. Select one of the options from the pop-up menu. The most common formatting options you use are Column Number, Heading and Order By. Clicking any of these options opens the Field Properties dialog box. FIELD PROPERTIES Page 16 10/16/99 University of British Columbia

PeopleSoft Query Format Query Output COLUMN NUMBER This is where you can re-order the columns. HEADING This is where you select or change headings for your columns. The heading options are: Option None Text RFT Short RFT Long Effect The column does not have a heading The column heading is the text you enter in the text box. The column heading is the short name of the field from the record definition The column heading is the long name of the field from the record definition If you start typing text into the text box, Query automatically selects the Text option. ORDER BY You can select one or more fields to sort your output. Double click in the Ord column. Query puts a number in the column. If this field is the first you selected, a 1 appears in the Ord column. The second column you click will be numbered 2 and so on. You can sort by as many fields as you like. Query will sort the rows by the first sort field, then use the second field to sort rows with the same value in the first field. CHANGING THE SORT ORDER Right click on the field s row Select Order By from the pop-up menu. The Field Properties dialog box appears. Enter an Order By Number in the dialog box Select Descending if you like. (The default is Ascending.) Click OK University of British Columbia 10/16/99 Page 17

Format Query Output PeopleSoft Query Translate Table Values Some fields may contain a short code, for which the Translate Table provides a corresponding set of values. If you use such a field in your query, a letter appears in the Xlt column for that field. By default, the letter is N (for None), meaning that Query will not replace the codes with the corresponding translate values. The other two values are L for Long and S for Short. If you want to display the translated value rather than the code, for example Active instead of A, you must set the translate value options. SET TRANSLATE VALUE OPTIONS Right click anywhere on the field in the Designer View Select Translate from the Pop-up menu. The Field Properties dialog box appears. Specify which Translate Value you want. Select Effective Date. For most tables, Query defaults to the Current Date. Click OK. In the Designer View, an N, L, or S appears in the Xlt column to indicate which translate values will be used, if any. Page 18 10/16/99 University of British Columbia

PeopleSoft Query Query Maintenance CHAPTER 6 Running Queries Running Queries After designing a query, you will want to run it to see the results. Query provides several output options, each of which can be extremely useful depending on your needs. OUTPUT OPTIONS Output Option Grid control Excel To Run Select File, Run(Current Query) OR click File, Run to Excel OR click Description To send the output to the grid control on the Results tab of the Designer View. This option is useful as you design and refine queries to get just the results you want. When your query is perfect, you can use one of the other output options. To send the output to MS Excel (using Query Link discussed below). Crystal Reports File, Run to Crystal OR click To send the output to Crystal Reports Pro, a report formatter, where you can use predefined formats or create new ones to print the results of your query. QUERY LINK QueryLink allows you to send the results of a query directly to an Excel spreadsheet, bypassing the need for a PeopleSoft nvision layout. Any query results sent to Excel through QueryLink are based on the QUERY.XLT Excel template. Therefore, if you want to make any permanent changes to spreadsheets derived through QueryLink, make the changes to QUERY.XLT. University of British Columbia 10/16/99 Page 19

Running Queries PeopleSoft Query CHAPTER 7 Query Maintenance Saving Queries Once you have designed a query, you must save it if you want to use it again. You save Queries as Public or Private. Public Queries are available to other users. If you save a Query as Private, you give it an Operator ID, which restricts use and update of the Query to you alone. To save a query: Select File menu, Save (or Save As). Give an easily recognizable name and description to your query. Maximum size is 30 characters. Click OK. Printing Queries It is a good idea to document your queries. When you print a query object, you print the definition of the query, not the results. To print a query: Select File menu, Print (Current Query Object). Deleting Queries To delete a query Select File menu, Delete. In the Delete Query dialog box click the down arrow select the Query you want to delete. Click OK. to view the Query list and Page 20 10/16/99 University of British Columbia