46
BASIC QUERY BASIC QUERY CLASS CLASS N.C. State University Financials Reporting

BASIC QUERY CLASS N.C. State University Financials Reporting

Embed Size (px)

Citation preview

Page 1: BASIC QUERY CLASS N.C. State University Financials Reporting

BASIC QUERYBASIC QUERYCLASSCLASS

N.C. State UniversityF

inan

cial

s R

epor

tin

g

Page 2: BASIC QUERY CLASS N.C. State University Financials Reporting

Objectives:Objectives:• Understand the structure of a Relational Database

• Understand how Public and Private Queries differ

• Run queries with results to PeopleSoft and to Excel

• Change Fields and Criteria in an existing query and save it as a Private Query

N.C. State UniversityF

inan

cial

s R

epor

tin

g

Page 3: BASIC QUERY CLASS N.C. State University Financials Reporting

JRNL_HEADER JRNL_LNJOURNAL_ID JOURNAL_IDJOURNAL_DATE JOURNAL_DATEFISCAL_YEAR PROJECT_IDACCOUNTING_PERIOD ACCOUNTOPRID DEPTID : PROGRAM_CODE MONETARY_AMOUNT JRNL_LN_REF LINE_DESCR

:

These tables relate to each other and can be linked together because of these common fields (Journal_id and Journal_date.

Because these two tables have common fields (Journal_id and Journal_date), they can be joined together. That way the JRNL_HEADER information (Fiscal_Year, Accounting_Period, OPRID) can be put next to each journal line from the JRNL_LN table.

Relational Database

A Relational Database stores data in two or more tables where relationships can be defined between the tables. A field will be in more than one table, and the tables can be joined or linked using that common field.

These fields are unique to this table.

These fields are unique to this table.

Page 4: BASIC QUERY CLASS N.C. State University Financials Reporting

Public vs. Private Queries

A Public Query is saved so that any user can access it and run it. Only a few people have access to save public queries to limit the number created.

A Private Query is saved so that only the user saving it can access it and run it. Anyone with query access can save private queries.

Page 5: BASIC QUERY CLASS N.C. State University Financials Reporting

TerminologyThe following list provides chartfield terminology as it translates from FAS to PeopleSoft Financials. It is important that you become familiar with this new terminology. Throughout this handbook, the Financials terminology will be used.

Financials Term FAS TermAccount Object Code or Account ControlFund BC/TFDeptid/Organization (Org) OUCProgram PurposeScenario ECApprop Nbr/Sub-Class-last 2 digits Fund Code

*The Project ID (Prj/GrtP has 3 different types:Project (Reference Project) Map Code, GLA, Home Account (ex. 015160) (ex. 15160)Segment (ex. 207637) FAS Account, SL Account (ex. 207637)Phase (ex. 207637-82001) FAS Project # (ex. 82001)

Page 6: BASIC QUERY CLASS N.C. State University Financials Reporting

Log onto PeopleSoft Financials Reporting System

Getting Started

Page 7: BASIC QUERY CLASS N.C. State University Financials Reporting

EXAMPLE 1: OPENING A PUBLIC QUERY AND

RUNNING THE RESULTS TO PEOPLESOFT

Navigate to the Query Panel…Go PeopleTools Query

Page 8: BASIC QUERY CLASS N.C. State University Financials Reporting

File Open to get to Open Query Box

Type “Q” and click the “Down Arrow” icon to see the Public Queries

Page 9: BASIC QUERY CLASS N.C. State University Financials Reporting

Notice the “Owners” for these Queries are listed as “Public” indicating they are Public Queries.

Find the Public Query named Q_Voucher_List_Not_Paid and highlight it by clicking on it. Then, click OK.

Page 10: BASIC QUERY CLASS N.C. State University Financials Reporting

The “Fields” tab shows the fields that are being selected from the tables in the query.

Notice the name of the Public Query you selected.

The “Query” tab in the lefthand side box shows the tables being queried and the available fields in those tables.

Page 11: BASIC QUERY CLASS N.C. State University Financials Reporting

The “Criteria” tab shows the criteria being used to narrow down our search.

NOTE: The “SQL” tab shows the programming code behind the fields selected and criteria given.

Page 12: BASIC QUERY CLASS N.C. State University Financials Reporting

To Run the Query with results to PeopleSoft, click on the “Lighting Bolt” icon.

A Prompt Box will appear so that you can enter your Project segment or Project phase, the beginning date, and the ending date. Enter these and click OK.

Page 13: BASIC QUERY CLASS N.C. State University Financials Reporting

The Results from the Query will appear on the “Results” tab.

Page 14: BASIC QUERY CLASS N.C. State University Financials Reporting

There are many fields selected in this query. Use the scroll bar to scroll through them.

Page 15: BASIC QUERY CLASS N.C. State University Financials Reporting

EXAMPLE 2: SAVING A PUBLIC QUERY AS A PRIVATE QUERY

We want to change this query. Before we do that, it is a good idea to save it as a private query first.

To save a query as a private query, you must update the query properties.

File Properties to get to the Query Properties box

Page 16: BASIC QUERY CLASS N.C. State University Financials Reporting

Click on the Public box to uncheck it and click OK

Page 17: BASIC QUERY CLASS N.C. State University Financials Reporting

When saving a public query as a private query, you must rename it. Use the File Save As function.

Navigate to File Save As

Page 18: BASIC QUERY CLASS N.C. State University Financials Reporting

• In the Save Query As box, type in the new name for your private query and click OK

• The private query name MUST be different from the public query name.

• We suggest you use your initials at the beginning of the name.

• Note that the system is case sensitive for query names.

•The owner MUST be private. If it is not, you need to check the query properties we just changed.

Page 19: BASIC QUERY CLASS N.C. State University Financials Reporting

Notice that the Query has the new name and is Private

Page 20: BASIC QUERY CLASS N.C. State University Financials Reporting

EXAMPLE 3: CHANGING THE FIELDS AND CRITERIA IN A QUERY AND RUNNING THE RESULTS TO PEOPLESOFT

We now want to change this query so that the information is selected based on organization rather than on project

• Go back to the Fields tab and notice that Organization is not being selected

• Scroll down the list of available fields in the lefthand side box until you find Deptid/Organization

• Double click on Deptid/Organization to select it as a field

Page 21: BASIC QUERY CLASS N.C. State University Financials Reporting

Notice that Organization is now listed on the Fields tab

As a side note, notice that Monetary Amount has “sum” in the Agg column. This means that lines with identical information in all of the fields will be grouped together as one line with the amount aggregated or summed.

Page 22: BASIC QUERY CLASS N.C. State University Financials Reporting

We want the results to be ordered or sorted first by Organization

Right Click on Organization and choose “Order By”

Page 23: BASIC QUERY CLASS N.C. State University Financials Reporting

Type “1” and click OK

Page 24: BASIC QUERY CLASS N.C. State University Financials Reporting

Notice that Organization now has “1” in the Ord column

Page 25: BASIC QUERY CLASS N.C. State University Financials Reporting

We want Organization to be the first column in our Results.

Right click on Organization and choose “Column Number”

Page 26: BASIC QUERY CLASS N.C. State University Financials Reporting

Type “1” and click OK

Page 27: BASIC QUERY CLASS N.C. State University Financials Reporting

Notice that Organization is now the first field in the list

Page 28: BASIC QUERY CLASS N.C. State University Financials Reporting

We want to add Organization as a Criteria.

Right click on Organization and choose “Criteria”

Page 29: BASIC QUERY CLASS N.C. State University Financials Reporting

Notice that Organization is now listed on the Criteria tab.

We do not want to select the information based on the Project_ID, so delete it as a Criteria.

Highlight Project_ID by clicking on it. Now click on the “Delete Criteria” icon

Page 30: BASIC QUERY CLASS N.C. State University Financials Reporting

Notice that Project_ID is no longer listed as a Criteria.

We want to specify which Organization(s) we want to search for.

• On the Organization line, double click on the “Operator Drop Down” icon

• Notice the various choices

• We want to search for more than one organization, so select “In List”

• Next, on the Organization Line, double click the blank area under “Expression” to bring up the Edit List prompt box

Page 31: BASIC QUERY CLASS N.C. State University Financials Reporting

• On the Edit List prompt box, click “Add Value” to add an organization. It brings you to the prompt box on the next slide

• Repeat this for each organization you want to add to the list to search on

Click OK when you are finished entering your organizations

Page 32: BASIC QUERY CLASS N.C. State University Financials Reporting

Enter your 6-digit organization and click OK

Page 33: BASIC QUERY CLASS N.C. State University Financials Reporting

Click on the “Lighting Bolt” icon to run the query with results to PeopleSoft

Notice the list of organizations in the criteria

Page 34: BASIC QUERY CLASS N.C. State University Financials Reporting

• A prompt box will appear so that you can enter the beginning date and the ending date

• Click OK

• Notice that you are not prompted for Project_ID this time as we deleted it from our criteria

Page 35: BASIC QUERY CLASS N.C. State University Financials Reporting

In the Results notice…

• Organization is selected

• The results are ordered or sorted by organization

• Organization is in the first column

• The results are for the organizations we specified in the criteria

…reflecting all of the changes we just made

Page 36: BASIC QUERY CLASS N.C. State University Financials Reporting

EXAMPLE 4: RUNNING A QUERY WITH THE RESULTS TO EXCEL

Navigate to the Open Query Box…File Open.

Type “Q” and click the “Down Arrow” icon to see the public queries.

Highlight the Public Query named Q_Paid_by_OUC/Invoice # and click OK.

Page 37: BASIC QUERY CLASS N.C. State University Financials Reporting

The Fields tab shows the fields being selected. You can add or delete fields, change the order the fields are presented in, change the order the fields are sorted in, and change the aggregate functions.

Page 38: BASIC QUERY CLASS N.C. State University Financials Reporting

The Criteria tab shows the criteria being used to narrow down the search. You can add, change, or delete criteria.

Click on “Excel” icon to run the query with results to Excel.

Page 39: BASIC QUERY CLASS N.C. State University Financials Reporting

Excel will open if not already opened. You will be prompted for some values (organization, beginning date, and ending date in this example). Click OK.

Page 40: BASIC QUERY CLASS N.C. State University Financials Reporting

The Results from the Query will appear in an Excel spreadsheet. You can use all of the Excel functionality to analyze the data. The Results can be saved on your hard drive as an Excel spreadsheet for later use and supporting documentation.

Page 41: BASIC QUERY CLASS N.C. State University Financials Reporting

EXAMPLE 5: A PUBLIC QUERY TO PRACTICE SAVING AS A PRIVATE QUERY AND TO PRACTICE MODIFYING

Navigate to the Open Query Box…File Open.

Type “Q” and click the “Down Arrow” icon to see the public queries.

Highlight the Public Query named Q_22010_Journals_by_Project and click OK.

Page 42: BASIC QUERY CLASS N.C. State University Financials Reporting

We will practice saving this public query as a private query and modifying the fields selected.

Page 43: BASIC QUERY CLASS N.C. State University Financials Reporting

We will also practice modifying the selection criteria and running the results to both PeopleSoft and Excel.

Page 44: BASIC QUERY CLASS N.C. State University Financials Reporting
Page 45: BASIC QUERY CLASS N.C. State University Financials Reporting

• To navigate to the Query Panel: Go PeopleTools Query

• To see existing public queries: File Open, Put “Q” as Query Name, Click on “Down Arrow” icon, Highlight Query Name, Click OK.

• To see existing private queries: File Open, Put your initial as Query Name, Click on “Down Arrow” icon, Highlight Query Name, Click OK.

• The fields selected can be changed on the Fields tab.

• The Criteria used to narrow the search can be changed on the criteria tab.

• Run the Query with results to PeopleSoft by clicking on the “Lighting Bolt” icon.

• Run the Query with results to Excel by clicking on the “Excel” icon

Checklist

Page 46: BASIC QUERY CLASS N.C. State University Financials Reporting

• To save a public query as a private query:

• Open the public query

• File Properties

• Uncheck Public, Click OK

• File Save As

• Put in the name of the query (suggest you use your initials for first 3 digits), Click OK

• EIS Financial Query Resources Webpage:

http://www.fis.ncsu.edu/EIS/FIN/query/query.htm

• Financials Training Webpage:

http://www.fis.ncsu.edu/FinTraining