Anda di halaman 1dari 35

Getting Started with PeopleSoft Query

PeopleSoft Query Overview


With PeopleSoft Query, you can extract the precise information that you are looking for by using visual representations of your PeopleSoft database, without writing Structured Query Language (SQL statements! "he #ueries that you write can be as simple or as complex as necessary$ they can be one%time #ueries or #ueries that you use repeatedly!

PeopleSoft Query Business Processes


"he following process flow illustrates the PeopleSoft Query business processes&

Common Elements in PeopleSoft Query


Add Record Show ields Col (column Query !ame 'lick this link to access the Query page, where you can add fields to the #uery content or add additional records! 'lick this link to display the fields included in the record! (isplays the current column number for each field listed! New Unsaved Query appears in this read%only field until you change it on the Properties page! "his field appears on all of the 'reate )ew Query pages! *ndicates key fields! 'lick the (elete button to delete the row! + confirmation message appears! 'lick the ,es button to proceed with the deletion! 'lick the )o button to cancel the deletion! 'lick the -se as 'riteria.+dd 'riteria button to open the /dit 'riteria Properties page, where you can determine how this field will be used as a criterion for the current #uery! 0rom the Query tab, click the 0older button to view the fields for the chosen record, if they are not already displayed! Query 1anager expands the record so that you can see the fields and make sure that this record has the content that you want! 'lick the 0older button again to hide the fields for a record! + key is displayed to the left of key fields!

Record" ieldname (isplays the record alias and name for each field listed!

Pages Used to Create a Query


Page Name Records Object Name QRY_RECORDS Navigation Reporting Tools, Query, Query Manager. Click the Create e! Query link, and click the Search "utton to #ind an e$isting record. Reporting Tools, Query, Query Manager. Click the Create e! Query link. Click the Search "utton to #ind an e$isting Record. Click the 'dd Record link #or the desired record. Reporting Tools, Query, Query Manager. Click the Create e! Query link. Click the Search "utton to #ind an e$isting Record. Click the 'dd Record link #or the desired record, Select the desired #ields. Click the .ields ta" to access the .ields page. .ro( the .ields page, click the Colu(n Order "utton. .ro( the .ields page, click the Sort Order "utton. .ro( the .ields page, click the Edit "utton to the right o# the desired #ield. Click the 3roperties link at the "otto( o# the page 4this link appears on all pages "ut the Run page5. *ith a %uery open, click the 1ie! SQ0 ta". Usage Select the records upon !hich to "ase the ne! %uery.

Query

QRY_Q&ERY

'dd #ields to the %uery content. You can also add additional records "y per#or(ing )oins. *hen you #irst access this page, i# you ha+e selected the record #or an e##ecti+e,dated ta"le, a page in#or(s you that an e##ecti+e date criteria has "een auto(atically added #or this record. Click O- to close the page.

.ields

QRY_./E0DS

1ie! ho! #ields are selected #or output2 +ie! the properties o# each #ield2 and change headings, order,"y nu("ers, and aggregate +alues.

Edit .ield Colu(n Order Edit .ield Sort Order Edit .ield 3roperties

QRY_./E0DS_CO0&M

&se to change the colu(n order #or (ultiple #ields.

QRY_./E0DS_ORDER

&se to change the sort order #or (ultiple #ields.

QRY_./E0DS_SEC

&se to #or(at the %uery output 4#or e$a(ple, to change colu(n headings or display translate ta"le +alues in place o# codes5.

Query 3roperties

QRY_3RO3ERT/ES

1ie! and edit data a"out the current %uery, such as the %uery na(e and description. 'lso use to record in#or(ation a"out your %uery so that you can use it again in the #uture. 1ie! the underlying SQ0 code that Query Manager generates "ased on your %uery de#inition. You cannot (odi#y SQ0 on this page. 1ie! the results o# your %uery prior to sa+ing in order to +eri#y that your %uery yields the results that you need. Continue to ad)ust and pre+ie! your %uery as necessary.

1ie! SQ0

QRY_SQ0

Run

Q&ERY_1/E*ER

*ith a %uery open, click the Run ta".

Selecting Records
!ote" *n your PeopleSoft database, tables are represented as record definitions! *n PeopleSoft Query, we refer to the record definitions as records! "o select a record& 2! 0ind the record upon which to base the #uery! *f you know the entire record name, description, access group name, or field name included in the record, select the appropriate item in the Search 3y drop%down list box! /nter the name in the field (or click the Look -p button if searching by access group name ! "hen click the Search button to display a list of records that match your search criteria! ,ou can perform a partial search by entering part of the name in the Search 3y field! !ote" /nter as much of the name as possible to find the correct record! ,ou can perform an advanced search by clicking the +dvanced Search link! ,ou can perform a progressively narrower search by selecting conditions for the record name, record description, or field name contained in the record, and then entering an appropriate search string in the fields that correspond to your selections! 0or access group name, select a condition, click the Lookup )ame button, and then select the access group name from the list of access group trees that appears! *f you want to view a list of available records, leave the field blank and click the Search button to display a list of up to 455 records! 3y default, only the first 65 records appear on the page! "o see more of the list, use the navigation buttons and links located on the header bar! "o display 255 of the records, select the 7iew 255 link, and use the scrollbar to go through the rest of the list! 6! *f you want to view a record8s fields, click Show 0ields next to the record in #uestion! + page displays the record8s fields! ,ou can use this information to verify whether you want to base the #uery upon this record! 4! 'lick 9eturn when you have finished looking at the fields! :! 'lick +dd 9ecord next to the record you want to add to the #uery! "his takes you to the Query field, from which you can select which fields from the selected record to add to the #uery! !ote" *n most cases, you will select only one base record from this page! *f you navigate back and select a second base record, you are creating an any join for the two records!

Adding Fields to Query Content


"o add fields to your #uery& 2! Select the fields to add to the #uery either by clicking their check boxes or by clicking the 'heck +ll 0ields button! 6! When you have selected the desired fields, click on the 0ields tab! 'lick the Sort button once to list fields in alphabetical order! 'lick the button again to return to the original sort! Alias #ierarchy $oin "he alias name that the system automatically assigns to the chosen records! 'lick this link to ;oin a child table to its parent table!

Chec% All ields 'lick this button to check all fields in the record! <nce you select a field, the system automatically adds it to the #uery and you can view it on the 0ields page! "his button does not appear when the field names are hidden! &nchec% All ields ields 'lick this button to clear all fields in the record! Select the check box to the left of each field that you want to add to your #uery content!

Related Record 'lick such links to ;oin two records that are based on a shared field! $oin 0or example, in the above example, the Q/=(/P"="3L record is related to the Q/=/1PL<,// record by the (/P"*( field! E'pand All Records Collapse All Records 'lick this button to view all fields in the records "his button appears only when there is more than one record listed! 'lick this button to hide all fields in the records! "his button appears only when there is more than one record listed!

Viewing Fields Selected for Output


ormat Ord (order 0ield type and length for each field listed! Shows one or more fields selected to sort your #uery output! *f the field is the first sort field, a 1 appears, and the system sorts rows that are based on this field first! "he second sort field that is selected is numbered 2, and so on! ,ou can also specify a descending sort order! "he letter D appears if you are sorting fields in descending order! Specifies the translate value that you want to appear in the #uery results& N (none , S (short , or L (long ! "he table you>re #uerying may include fields that use the "ranslate table! *f so, the field itself contains a short code of some kind, for which the "ranslate table provides a set of corresponding values! 0or example, if the table includes an /00=S"+"-S field, the value is A or I, which the "ranslate table translates into Active and Inactive! *f a field has values on the "ranslate table, a letter appears in the ?L+" column for that field! *n your #uery results, you might want to display the translated value rather than the code (for example, Active instead of A ! "o instruct PeopleSoft Query to make this substitution, specify L as the translate value! "ranslate tables are effective%dated, so you must select which effective date to use for them! 0or most tables, PeopleSoft Query defaults to the current date, meaning that it uses the currently active list of "ranslate table values! @owever, if the table you>re #uerying is also effective%dated, PeopleSoft Query uses the value in the /00(" field for a row! "hat is, for each row the #uery returns, PeopleSoft Query uses the "ranslate table values that were active as of that row>s effective date! *f neither of these effective date options are what you want, you have two more options& *f the table you>re #uerying includes another date field, you can use the value in that field as the effective date for "ranslate table values! 'lick the /dit button, select the 0ield option, and then select the field name from the drop%down list box! -se an expression to set the effective date for the "ranslate table! 0or example, enter a fixed effective date or prompt the user for a fixed effective date!

()A* (translate

Agg (aggregate #eading *e't Edit Column Order Sort Order

+ggregate function for each field listed! "he heading assigned to appear at the top of the column for the #uery output for each field listed! 'lick this button to display the /dit 0ield Properties page! 'lick this button to display the /dit 0ield 'olumn <rder page, which enables you to change the column order for multiple fields! 'lick this button to display the /dit 0ield Sort <rder page, which enables you to change the sort order for multiple fields!

Changing the Column Order for Multiple Fields


Column Order /nter the desired column order! 'olumns left blank or assigned a Aero are automatically assigned a number!

Changing the Sort Order for Multiple Fields


Sort Order /nter the desired sort order! /nter Aero to remove a sort order! *f the field is the first sort field, enter 1, and the system sorts rows based on this field first! "o designate the second sort field, enter 2, and so on!

+irection Select Ascending to sort fields in ascending order! Select Descending to sort fields in descending order! "he default direction is Ascending.

diting Field Properties


ield !ame Column !um,er #eading "he name of the field for which you are editing properties! 3y default, the fields appear in the same order as they are listed in the record on the Query page! "o change the order for the selected field, enter the new column number! When you close the 0ield Properties page, the columns reorder! 'hoose a column heading from the following& No Heading: "he column does not have a heading! e!t: "he column heading is the text that you have entered in the text box! "# S$ort: "he column heading is the short name from the record definition! "# Long: "he column heading is the long name from the record definition!

&ni-ue ield -sed for translations! "here is no need to change the default value, which is a single%letter alias for the !ame record followed by the record field name (for example +!)+1/ or 3!/1PL*( ! Aggregate *f you are using aggregate values, select the aggregate function value for this field! +n aggregate function is a special type of operator that returns a single value based on multiple rows of data! When your #uery includes one or more aggregate functions, PeopleSoft Query collects related rows and displays a single row that summariAes their contents! Will not use aggregate functions! +dds the values from each row and displays the total! 'ounts the number of rows! 'hecks the value from each row and returns the lowest one! 'hecks the value from each row and returns the highest one! +dds the values from each row and divides the result by the number of rows!

!one Sum Count .in (minimum .a' (maximum Average

Viewing and diting Query Properties


Query +escription older Query *ype Owner -se this field to edit the name of the Query! /dit the description of the #uery!! /nter the name of the folder in which you would like the #uery to reside! "o create a new folder, enter the name of the new folder! Select Arc$ive, %rocess, "o&e or User. Workflow #ueries are either %rocess or "o&e. Select from the following& %rivate: *f you select this option, only the user *( that created the #uery can open, run, modify, or delete the #uery! %u'&ic:*f you select this option, any user with access to the records used by the #uery can run, modify, or delete the #uery (if he or she has access to public #ueries ! Select this check box to eliminate duplicate rows in a #uery result!

+istinct

Some #ueries return the same row more than once because it satisfies the #uery in more than one case! 0or example, if you #uery the B<3 record to return all B<3'<(/S, you will receive multiple rows that look identical because some employees have the same B<3'<(/! *f you select the (istinct check box, you will receive each B<3'<(/ only once! "his option is not visible for union selections because unions are automatically distinct! Query +efinition 0ree text area that you can use to further describe your #uery!

Viewing Underlying SQ! Code


Query SQ) (isplays the underlying SQL code that Query 1anager generates based on your #uery definition! "o copy the SQL statement, highlight the text of the statement and copy it using your browser>s copy command! Paste it into another application, if desired!

Pre"iewing Query Results Prior to Sa"ing


/iew All 'lick this link to view all rows and use scroll bar to navigate! Rerun Query 'lick this link to rerun your #uery preview! *f you have made changes to your #uery since the last preview, you must rerun the #uery to see the effect of your changes! !ote" *f you do not want to rerun the #uery every time you want to preview it, deactivate the /nable +uto Preview feature! When this feature is active, your #uery automatically runs each time you select the 9un tab! "o activate /nable +uto Preview, click the Preferences link and then select /nable +uto Preview! ("he Preferences link is available on every page except the 9un page! +ownload to 'lick this link to download your #uery to /xcel! E'cel !ote" "o grant users access to download your #uery to /xcel, you must make sure that their the permission lists include the W/3L*3=Q-/9, web library with full access!

Saving Queries
,ou can save a #uery at any time after you have selected one record and at least one field for it! Save #ueries from any Query 1anager page (except for the 9un page by clicking either the Save button or the Save +s link! ,ou must enter some basic information about the #uery before the system allows you to save it for the first time! "o save a #uery for the first time& 2! +fter you make your changes in Query 1anager, select Save! 6! *n the Query field, enter a short name for the #uery! 4! *n the (escription field, enter an appropriate description for the #uery! "his information will help you identify the #uery later! :! *n the 0older field, enter the name of the folder into which you would like to save the #uery! "o create a new folder, enter the name of the new folder! !ote" "he folder that you create will not reside on your local drive! ,ou create a folder for the purpose of describing the #uery and to facilitate grouping and sorting! C! Select a #uery type! Standard #ueries are designated as User #ueries! *f you have access to workflow #ueries, your list of types will also expand to include role, process, and archive! D! *n the <wner field, select whether your #uery is %u'&ic or %rivate. %rivate means that only the user *( that created the #uery can open, run, modify, or delete the #uery!

%u'&ic means that any user with access to the records used by the #uery can run, modify, or delete the #uery!

E! /nter the #uery definition! F! 'lick <G to save the #uery! !ote" -sing Save +s creates another instance of the #uery that you can modify and save under a different name! When you select Save +s, the page you ;ust saw appears, enabling you to change the name, description, and owner of the new #uery!

Running Queries
,ou can run a predefined #uery from your browser and view it online! When you click the 9un button on the Query 1anager search page, PeopleSoft Query displays the results in a new browser window! "his 9un option is useful if you want to run multiple #ueries or run the same #uery multiple times with different run time prompt values and compare the results of the #ueries! *f you want to run #ueries that you haven8t saved, you can use the 9un page in the Query 1anager! "o run a #uery& 2! Select 9eporting "ools, Query, Query 1anager! Query 1anager Search page appears! 6! Search for a #uery using the basic or advanced search function! 3oth search types allow you to use the following searc$ 'y criteria& access group name, description, folder name, owner, #uery name, type, uses field name, and uses record name! "he basic search allows you to search using the 'egins wit$ condition! "he advanced search allows you to perform a progressively narrower search by using one or more searc$ 'y criteria and selecting from a broad choice of conditions! "he following provides instructions on using searc$ 'y criteria& *f you know the entire name of the #uery that you want to run, select Query )ame from the Search by drop%down list box! "hen enter the #uery name in the Search by field! *f you do not know the name of the #uery and want to search through a list of #ueries, leave the Search by field blank and click the Search button to display a list of up to 455 #ueries! Perform a partial search by entering part of the search string in the Search by field! "o search using any other searc$ 'y criteria, select the appropriate item from the Search 3y drop%down list box, then enter the search string in the field!

4! "o perform an advanced search, click the +dvanced Search link on the Query 1anager Search page! <n the +dvanced Search page, select the appropriate searc$ 'y criteria and conditions, then enter a search string in each of the corresponding fields! :! 'lick the Search button to display a list of #ueries that match your search criteria! "he Search 9esults page appears! "he results list all the #ueries that match the search criteria! "he following information appears& Query name! Query description! <wner (public or private ! 0older!

C! Scroll to the name of the #uery that you want to run! 3y default, only the first 45 #ueries appear on the page! "o see more of the list, click the navigation buttons and links located on the header bar! "o display 255 of the #ueries, select 7iew 255 and use the scrollbar to view the rest of the list! D! "o run a #uery, select from the following links on the row of the #uery& 9un to @"1L& 'lick to generate an @"1L version of the #uery!

9un to /xcel& 'lick to download the #uery to an /xcel spreadsheet! Schedule& 'lick to schedule a time for the #uery to run!

(efining Selection 'riteria "o selectively retrieve ;ust the data you want, you define se&ection criteria! Selection criteria refine your #uery by specifying conditions that the retrieved data must meet! 0or example, you can specify that the system retrieve only those phone numbers with a certain area code instead of all phone numbers! "his chapter discusses how to& 'hoose selection criteria! (efine criteria! (efine prompts! (efine @+7*)H criteria! (efine expressions!

Choosing Selection Criteria


3ecause your PeopleSoft database stores data in tables, you can identify every individual piece of data by saying what co&u(n (field and row (record its in! When you create a #uery, pick the data that you want by specifying which columns and rows you want the system to retrieve! *f you run the #uery after selecting the fields, the system retrieves a&& the data in those columns$ that is, it retrieves the data from every row in the table or tables! "here is a good chance that this is much more data than you want or need! ,ou select which rows of data you want by adding selection criteria to the #uery! "he selection criteria serves as a test that the system applies to each row of data in the tables that you are #uerying! *f the row passes the test, the system retrieves it$ if the row does not pass, the system does not retrieve it! 0or example, suppose that you needed the names of all PeopleStore customers who are not PeopleSoft employees! ,ou would start by creating a #uery that retrieved the )ame and 'ompany fields from the 'ustomer table! ,ou could then add a selection criterion that told PeopleSoft Query to scan for rows where the company name is not %eo)&eSo*t. *n most cases, a selection criterion compares the value in one of a row>s fields to a reference value! *n the preceding example, you would compare the value in the 'ompany field to the constant value %eo)&eSo*t. *n other situations, you might compare the value to the value in another record field or to a value that the user enters when running the #uery!

+efining Criteria
"his section discusses how to& 7iew and edit selection criteria! Select condition types! /nter comparison values! Specify effective date criteria! 9elate multiple criteria!

Pages Used to nter Selection Criteria


Page Name Query Object Name QRY_Q&ERY Navigation Reporting Tools, Query, Query Manager, Create e! Query, Criteria Click the Create e! Query link on the Query Manager search page. Click the Search "utton. Click the 'dd Record link to select a record #or the %uery. On the Query page, select each #ield that you !ant to use in the %uery Usage Select a record #or the %uery criteria.

.ields

QRY_./E0DS

Select the #ields to "e used

Page Name

Object Name

Navigation then click the 'dd Criteria icon, or click the Check 'll .ields "utton to select all the #ields associated !ith the record as criteria.

Usage as criteria #or the %uery.

Criteria

QRY_CR/TER/'

Reporting Tools, Query, Query Manager, Criteria

&se this page to add selection criteria #or your %uery state(ent. Modi#y properties #or the selected criteria.

Edit Criteria 3roperties

QRY_CR/TER/'_SEC

Reporting Tools, Query, Query Manager, Create e! Query, Criteria Click the &se 's Criteria link on the Query page or click the 'dd Criteria "utton on the Criteria page.

Viewing and diting Selection Criteria


+ccess the 'riteria page!
'riteria page

+ny rows after the first row must include either an +)( or <9 logical value in the Logical column to specify whether you want the rows to meet this criterion in addition to other criteria you have defined or as an alternative criterion! "he first criterion you define does not have a value in this column! "he default for subse#uent criteria is +)(! "o reorder the criteria for your #uery, click 9eorder 'riteria, enter the new positions for the criteria on the /dit 'riteria <rdering page, and click <G! ,ou can also click the +dd 'riteria button from this 'riteria page to add additional criteria, and you can click the Hroup 'riteria button to group your criteria logically!

diting Criteria Properties


+ccess the /dit 'riteria Properties page!
/dit 'riteria Properties page

ield

Select this option if you want to base the selection criterion on another field>s value! -sually a field in another record component! "o compare the values from fields in two records, you must ;oin the record components! When you select this option, you must go on to select a condition type! 'lick the drop%down button in the 'ondition "ype column and select the appropriate comparison operator from the pop%up menu!

E'pression Select this option if you want PeopleSoft Query to evaluate an expression that you enter before comparing the result to the value in the selected field! When you select this option and then click the New +!)ression link to create a new expression, you must go on to select an expression type! *f you are entering an aggregate value, select the +ggregate 0unction check box! ,ou can also enter parameters for length and decimal positions! +lso enter the expression in the text box! Query 1anager inserts this expression into the Structured Query Language (SQL ! Criteria Based on a ield "o create criteria based on a field& 2! 'lick the +dd 'riteria icon that is associated with the re#uired field, on the 0ields or Query page! Query 1anager opens the /dit 'riteria Properties page with the selected field entered as /xpression 2! 6! Specify the criteria for that field, and then click <G to return to the 0ields or Query page! ,ou can also use a field from a record as criteria even if you have not chosen that field for #uery output!

Criteria !ot Based on a ield "o create criteria that is not based on a field& 2! 'lick the +dd 'riteria button on the 'riteria page! "he /dit 'riteria Properties page appears, enabling you to edit /xpression 2 and /xpression 6! 6! *n the 'hoose /xpression 2 "ype group box, select 0ield or /xpression! 4! /dit the second (right%hand /xpression column to enter comparison values! :! Save your #uery!

Selecting Condition #ypes


"he condition type determines how Query 1anager compares the values of the first (left%hand expression to the second (right%hand expression! "he following table describes the available condition types! Query 1anager also offers a InotJ option that reverses the effect of each condition type! 0or example, not e,ua& to returns all rows that e,ua& to would not return! !ote" *t is always better to use the not version of an operator rather than the )<" operator on the entire criterion! When you use )<", PeopleSoft Query cannot use SQL indexes to speed up the data search! When you use the not version of an operator, PeopleSoft Query can translate it into an SQL expression that enables it to use the indexes! Condition Types "et!een e%ual to e$ists When It Returns a Row

The +alue in the selected record #ield #alls "et!een t!o co(parison +alues. The range is inclusi+e. The +alue in the selected record #ield e$actly (atches the co(parison +alue. This operator is di##erent #ro( the others, in that it does not co(pare a record #ield to the co(parison +alue. The co(parison +alue is a su"%uery. /# the su"%uery returns any data, 3eopleSo#t Query returns the corresponding ro!. The +alue in the record #ield is greater than the co(parison +alue. The +alue in the selected record #ield (atches one o# the co(parison +alues in a list. The +alue in the selected record #ield appears as a node in a tree created !ith 3eopleSo#t Tree Manager. The co(parison +alue #or this operator is a tree or "ranch o# a tree that you !ant 3eopleSo#t Query to search. Note. 3eopleSo#t Query should not use trees that contain a co("ination o# dyna(ic details and range details. The results returned #ro( trees !ith this co("ination o# details (ay "e inaccurate.

greater than in list in tree

is null

The selected record #ield does not ha+e a +alue in it. You do not speci#y a co(parison +alue #or this operator. -ey #ields, re%uired #ields, character #ields, and nu(eric #ields do not allo! null +alues. The +alue in the record #ield is less than the co(parison +alue. The +alue in the selected #ield (atches a speci#ied string pattern. The co(parison +alue (ay "e a string that contains !ildcard characters. The !ildcard characters that 3eopleSo#t Query recogni6es are 7 and _. 7 (atches any string o# 6ero or (ore characters. .or e$a(ple, C7 (atches any string starting !ith C, including C alone. _ (atches any single character. .or e$a(ple, _ones (atches any #i+e,character string ending !ith ones, such as 8ones or Cones. 3eopleSo#t Query also recogni6es any !ildcard characters that your data"ase so#t!are supports. See your data"ase (anage(ent syste( docu(entation #or details. To use one o# the !ildcard characters as a literal character 4#or e$a(ple, to include a 7 in your string5, precede the character !ith a 9 4#or e$a(ple, percent975.

less than like

!ote" *f you have selected the /00(" field on an effective%dated table, PeopleSoft Query also offers special effective date operators!

ntering Comparison Values


"his section provides an overview of comparison values and discusses how to& Select a constant value! 3uild a list of values! +dd prompts to an expression list! +dd comparison values to an expression list!

"he procedure for entering comparison values differs depending on what kind of value you are entering! *f you are comparing one field to another, pick the second record field$ if you are comparing the rows to a constant value, enter the constant! "he following table describes all the available value types, the pages that appear based on each comparison type, and the fields you must complete in those pages! a!ue Type .ield "ction The +alue in the selected #ield is co(pared to the +alue in another #ield, usually a #ield in another record co(ponent. *hen you select .ield as the co(parison +alue, the Choose Record and .ield page appears. The Record 'lias #ield lists all the records that are part o# the current %uery. Select the record and the #ield. The selected #ield na(e appears in the second E$pression colu(n o# that #ield:s ro!. The +alue in the selected #ield is co(pared to an e$pression you enter, !hich 3eopleSo#t Query e+aluates once #or each ro! "e#ore co(paring the result to the +alue in the selected #ield. *hen you select E$pression as the co(parison +alue, the De#ine E$pression page appears. /n the te$t "o$, enter a +alid SQ0 e$pression. To add a #ield or user pro(pt to the e$pression, click the 'dd .ield or 'dd 3ro(pt link, respecti+ely. These links display the sa(e pages that you see !hen adding a #ield or pro(pt as a co(parison +alue; 'dd 3ro(pt displays the Run,ti(e 3ro(pt page2 'dd .ield link displays the Select a .ield page. The only di##erence is that 3eopleSo#t Query adds the #ield or pro(pt to your e$pression rather than using it directly as the co(parison +alue. The +alue in the selected #ield is co(pared to a single #i$ed +alue. *hen you select Constant as the co(parison +alue the De#ine Constant page appears. /n the te$t "o$, enter the +alue you !ant to co(pare the #irst e$pression to. To add a +alue "y selecting it #ro( a list, click the 0ook &p "utton to display the Select a Constant page. Note. ' list o# constants is only a+aila"le #or #ields that ha+e translate +alues or an assigned pro(pt ta"le. See Selecting a Constant Value. 3ro(pt The +alue in the selected #ield is co(pared to a +alue that you enter !hen running the %uery. *hen you select 3ro(pt as the co(parison +alue, the De#ine 3ro(pt page appears. Click the e! 3ro(pt link to (o+e to the Edit 3ro(pt 3roperties page. To (odi#y an e$isting pro(pt, you can click the Edit 3ro(pt link. See De#ining 3ro(pts. The +alue in the selected #ield is co(pared to the data returned "y a su"%uery. *hen you select Su"%uery as the co(parison +alue, the De#ine Su"%uery page appears. Click the De#ine<Edit Su"%uery link to (o+e to the Records ta" to start a ne! %uery. See *orking !ith Su"%ueries. The +alue in the selected #ield is co(pared to a list o# +alues that you enter. This +alue type is a+aila"le only !hen the selected operator is in list or not in list. *hen you select /n 0ist as your co(parison +alue, the Edit 0ist page appears. &se the 0ook &p "utton to display the Edit 0ist

E$pression

Constant

Su"%uery

/n 0ist

a!ue Type

"ction page and search #or the desired +alues. ote that +alues !ill appear here only i# you ha+e entered the( pre+iously. See Building a List of Values.

Current Date Tree Option

The +alue in the selected #ield is co(pared to the current date on the data"ase ser+er. The +alue in the selected #ield is co(pared to a selected set o# tree nodes. This +alue type is a+aila"le only !hen the selected operator is in tree or not in tree. *hen you select Tree Option as the co(parison +alue, the Select Tree ode 0ist page appears. &se this page to create a list o# +alues #or 3eopleSo#t Query to co(pare to the +alue #ro( the #irst e$pression. &sed on so(e e##ecti+e,dated records, the e##ecti+e se%uence is a se%uencing nu("er pro+ided to #urther re#ine the e##ecti+e date.

E##ecti+e Se% 4e##ecti+e se%uence5

!ote" )ot all value types are available for all operators! 0or example, when you select the e!ists operator, Su',uery is the only available value type! +fter you select an operator, PeopleSoft Query displays only the value types that are available for that operator! Selecting a Constant /alue When you select -onstant as your comparison value, the (efine 'onstant page appears! *n the text box enter the value to which you want to compare the first expression! "o add a value by selecting it from a list, click the Look -p button to display the Select a 'onstant page! !ote" + list of constants is only available for fields that have translate values or an assigned prompt table!

Select a 'onstant page

"o select a constant& 2! 'lick the Look -p button to select a constant! "he Look -p page appears! 6! Select the desired value from the result list by clicking its associated link! "he Select a 'onstant page appears again with the selected value in the field! *f you are working with a date field, you can select a date.constant from a calendar! 4! *f more than one field exists on the Select a 'onstant page, you must repeat steps 2 and 6 for each field in order to further narrow your search for the constant! :! 'lick <G! "he /dit 'riteria Properties page appears, with the selected value in the (efine 'onstant page! Building a )ist of /alues When you select In List as your comparison value, the /dit List page appears! -se this page to build a list of values for PeopleSoft Query to compare to the value from the first expression! (<nce you have created such a list, you can also use this page to select from the list! "o add a comparison value to the list, click the Look -p button on the /dit List page! "his displays the /dit List page, which dynamically reflects which record is used!
/dit List page

)ist Lists the values that have been selected using the +dd 7alue button! .em,ers !ote" "he grid, containing the selected value, appears when a value is selected!

"o delete a value, select the check box to the left of the appropriate List 1embers value and click the (elete 'hecked 7alues button! /alue "o add a value, enter it into the 7alue text box and click the +dd 7alue button! "he value will display in the List 1embers grid! "o select from a list of values, click the Search button to display the Select a 'onstant page! 'lick the Look -p button to display the Look -p page! /nter part of a value in the text box! "he system automatically adds a wildcard to the end of the entry, which enables you to do a partial search! 0or example, if you enter a value of 1., the system will return all values, (up to a total of 455 , that begin with 25, such 1., 1.., and 1../0. 'lick the Look -p button to display the list of values that corresponds to the search criteria! Select the desired value from the list by clicking its associated link! "he Select a 'onstant page appears again! 'lick <G! "he selected value will display in the List 1embers grid! Select to add one or more prompts to the list so that users can enter the comparison values when they run the #uery! !ote" "he prompts must be defined before you can select them! *f no prompts have been defined, you will receive an error message! O0 'lick to accept the values listed on the List 1embers grid! ,ou will return to the /dit 'riteria Properties page, where the selected values will be displayed in the /dit List page! 'lick to return to the /dit 'riteria Properties page without saving selections!

Add Prompt

Cancel

Adding Prompts to an E'pression )ist ,ou can add one or more prompts to the expression list so that users can enter comparison values when they run a #uery! !ote" ,ou must have defined the prompts before you can add them to your expression list! "o add prompts to an expression list& 2! With the /xpression List open, click the +dd Prompt link to open the Select a Prompt page! 6! 'lick the re#uired prompt! "he prompt appears on the /dit List page! *f you selected the in &ist operator, you may want to add more than one prompt so that your users can enter more than one value to search for! 4! "o add another prompt, click the +dd Prompt link again and select a different prompt! 3ecause you already have a prompt in place, a different page appears, showing the prompt you have already added! :! "o add the next prompt, click the )ew button and complete the 9un%time Prompt page! "he settings for this second prompt are the same as those used with the first prompt! *f you want a different label for this prompt, enter that label in the @eading "ext text box! When you click <G, the second prompt appears in the +vailable Prompts list! C! @ighlight the second prompt, and click the Select button to add it to the list of comparison values! "he prompt then appears in the /dit List page! D! 9epeat this process for each prompt you want to add! When you>re done, click <G to close the /dit List page! Adding Comparison /alues to an E'pression )ist When you select "ree <ption as the comparison value (available if you select the in tree or not in tree condition type , the Select "ree )ode List page appears! -se this page to create a list of values for PeopleSoft Query to compare to the value from the first expression! 'lick the )ew )ode List link to display the Select "ree page!

*f the Selected )odes List has been previously populated, you can either& 'hange the tree by clicking the )ew )odes List link! <pen the previously selected tree, bypassing the "ree Selection page, by clicking the /dit )ode List link!

'lick the name of the desired tree to display the (isplay and Select "ree)odes page, which you can use to select which element of the tree PeopleSoft Query will check! *f no nodes have been previously selected, the Selected )odes List grid is collapsed! *f you do not know the name of the tree, you can perform a search for the tree!
Selecting tree nodes on the (isplay and Select "ree)odes page

"o select tree nodes& 2! @ighlight the desired tree node, and click the +dd )ode icon! 6! *f you know the name of the desired node, enter the name of the desired node in the 1anual Selection list box! +lternatively, click the Look -p button to select the desired node from a list of available nodes! When you find the node you>re looking for, click the +dd to List button to add it to the list! "he nodes you enter or select from the list appear in the Selected )odes list box! 4! 9emove nodes from the list by clicking the 9emove from List icon corresponding to the node to be deleted! :! (isplay the selected tree branch by clicking the corresponding icon! C! <nce you are done selecting nodes, click <G! "he selected tree Set*(, tree name, effective date, and selected nodes appear in the Select "ree )ode List page!

Specifying ffecti"e $ate Criteria


/ffective%dated tables have record definitions that include the /ffective (ate (/00(" field! "his field, used throughout the PeopleSoft applications, provides a historical perspective, allowing you to see how the data has changed over time! Whenever users add a row of data to the table, they specify the date on which that data becomes effective$ whenever users change a row of data, they specify a new effective date, and the system retains the previous version of the row as history! When you use a PeopleSoft application for day%to%day processing, you usually want the system to give you the current&y e**ective rows of dataKthe rows where the effective date is less than or e#ual to today>s date! ,ou do not want to see the history rows, which are no longer accurate, nor do you want to see future%dated rows, which are not yet in effect! When you #uery an effective%dated table, however, you may want to see some rows that are not currently in effect! ,ou might want to see all the rows, regardless of their effective dates! <r you might want to see the rows that were effective as of some date in the past! "o specify effective date criteria& 2! When you choose the record that has /00(" as a key field, Query 1anager automatically creates default criteria and adds that criteria to the 'riteria page! "his criteria is used to specify which row of data PeopleSoft Query retrieves for each item in the table! "he default is the currently effective row! (efaults are as follows& E'pression 1 Condition *ype E'pression 2 Effective Se-uence 9ecord +lias!/00(" /ff(t LM 'urrent (ate Last

6! *f you choose one of the comparison options, choose to compare each row>s effective date against today>s date or a date other than today! Select -urrent Date to compare each row>s effective date against today>s date! Select -onstant to display the (efine 'onstant box so that you can enter a date!

Select this option when you want to see the rows that were effective as of a past date or that will be effective on some future date! Select +!)ression to display the (efine /xpression page so that you can enter a SQL expression that evaluates to a date! Select this option if you want to prompt users for an effective date when they run the #uery! ,ou can add a prompt to the expression you define in the (efine /xpression page! Select #ie&d to display the Select 0ield box so that you can select the record field that holds the date to which you want to compare effective dates! Select this option when you want to see the rows that were effective at the same time as some other record! 0or example, if you>re reviewing the list of products on a customer order, you will want to see the products that were effective on the date of the order! Select #irst +**ective Date to return the row with the oldest effective date, usually the first row entered for an item! Select Last +**ective Date to return the row with the latest effective date, even if that date is still in the future! 9emoving the +**ective Datecriterion is e#uivalent to selecting No +**ective Date! "he #uery will return all rows, regardless of their effective dates!

!ote" +ll options (except No +**ective Date return a single row for each item on the table! *f you want a subset of the rows (say, all future%dated rows or all history rows , enter a selection criterion on the /ffective (ate field! -se the standard comparison operators rather than the /ffective (ate comparison operators! Geep in mind that the effective date operators work differently than the standard comparison operators& they always return a single effective%dated row! 0or example, /ff (ate LM returns the one row whose /00(" value is most recent, whereas not greater than would return the currently active row and all history rows! See Also -sing /ffective (ates

Relating Multiple Criteria


-sing PeopleSoft Query, you can relate multiple criteria in specific ways that you define using the +)(, +)( )<", <9, and <9 )<" operators! ,ou can also group criteria using parentheses! "his section discusses how to& -se +)( and <9 logical operators! Hroup criteria with parentheses!

&sing A!+ and OR )ogical Operators When you specify two or more selection criteria for a #uery, you must tell PeopleSoft Query how to coordinate the different criteria! 0or example, suppose you are #uerying your list of customers and you have defined two criteria& one that selects customers from the state of Washington and another that selects customers who have purchased airplanes! ,ou may want PeopleSoft Query to return only those rows that meet 'ot$ conditions (customers in Washington who have purchased airplanes , or you may want the rows that meet eit$er one of the conditions (a&& Washington customers plus a&& customers who have purchased airplanes !

9ows returned by +)( and <9

When your #uery includes multiple criteria, link them using either +)(, +)( )<", <9, or <9 )<"! When you link two criteria with +)(, a row must meet the first and second criterion in order for PeopleSoft Query to return it! When you link two criteria with <9, a row must meet the first or second criterion, but not necessarily both! 3y default, PeopleSoft Query assumes that you want rows that meet all of the criteria you specify! When you add a new criterion, PeopleSoft Query displays AND in the Logical column on the 'riteria tab! "o link the criterion using one of the other options instead, select the re#uired option from the drop%down list! Grouping Criteria with Parentheses When your #uery includes multiple criteria, PeopleSoft Query checks the criteria according to the rules of logic& it evaluates criteria linked by +)(s before those linked by <9s! When all the criteria are linked by +)(s, this order always returns the correct results! When you mix in one or more <9s, however, this is not always what you want! 0or example, suppose you wanted a list of employees who are not married and reside in either 'alifornia ('+ or 3ritish 'olumbia (3' ! /nter the following criteria&
/xample of criteria that returns an incorrect result

"he set of criteria entered in the previous screen shot returns a list of employees in 'alifornia (except for those who are married and a&& employees in 3ritish 'olumbia (including those who are married ! "his list results because PeopleSoft Query evaluates criteria in the order of appearance! *t looks for rows where the employee is not married and where the state is 'alifornia or rows where the state is 3ritish 'olumbia! What you really want PeopleSoft Query to search for are rows where the state is 3ritish 'olumbia or 'alifornia, and where the marital status is not married! "hat is, you want PeopleSoft Query to evaluate the <9 before the +)(! "o accomplish this task, add parentheses to the list of criteria! When a list of criteria includes parentheses, PeopleSoft Query evaluates the criteria inside the parentheses before the criteria outside the parentheses! <n the 'riteria tab, the opening parenthesis appears ;ust before the field name and the closing parenthesis appears ;ust after the comparison value! 0or example, following is the set of criteria that returns the result you want&
+dding parentheses around the last two criteria

"o group criteria& 2! 'lick the Hroup 'riteria button on the 'riteria tab! "he /dit 'riteria Hrouping page appears! 6! -se the edit boxes to enter parenthesis for the criteria as needed! + parenthesis appears at the beginning of the /xpression2 column for the first row that you selected and at the end of the /xpression6 column for the last row that you selected! *n the previous example, notice that the AND operator )recedes the parentheses, while the 1" operator is located wit$in the parentheses! ,ou can add as many parentheses as needed!

+efining Prompts
"his section provides an overview of prompts and discusses how to add or edit a prompt!

Understanding Prompts
+dding a prompt lets you further refine a #uery when you run it! 0or example, suppose you want to change a #uery so that you can prompt the user to enter a value for the duration of a vacation! 3efore you added the prompt, the #uery always retrieved rows for employees who had taken vacation based on a defined constant value on which to make a comparison! +dding a prompt to the #uery enables the user to enter any duration, and then the #uery can return employees based on the value provided when running the #uery! When you run a #uery with a prompt, a prompt page re#uests the re#uired value! /nter the value into the field! "he #uery uses the value that you enter as the comparison value for the criterion that included the prompt!

*f the field for which you are prompting has an associated prompt table (even if it is the "ranslate table , the /dit "able drop%down list box shows its name!

Pages Used to $efine Prompts


Page Name 3ro(pts Object Name QRY_3ROM3T Navigation Reporting Tools, Query, Query Manager Click the Create e! Query link. Click the 3ro(pts ta". Reporting Tools, Query, Query Manager Click the Create e! Query link. Click the 3ro(pts ta". Click the 'dd "utton or the Edit "utton on the 3ro(pts page. Usage &se this page to add or edit a pro(pt.

Edit 3ro(pt 3roperties

QRY_3ROM3T_SEC

&se this page to edit the pro(pt properties.

diting Prompt Properties


+ccess the /dit Prompt Properties page!
/dit Prompt Properties page

"o define prompts& 2! 0rom the Prompts page, click the +dd Prompt button to add a new prompt, or click the appropriate /dit button to edit an existing prompt! "he /dit Prompt Properties page appears! 6! 'lick the Look -p button next to the 0ield )ame field to select a prompt field! +fter you select a prompt field, the name of the field appears! PeopleSoft Query looks to the record definition for information about this field and completes the rest of the page based on its properties! *ype ormat )ength +ecimals Edit *ype *ndicates the type of the field!!!! Specifies the field format! "here are over a doAen available formats, including )ame, Phone, Social Security )umber, and Nip 'ode! *ndicates the field length! (efines the number of decimals allowed! (efines the type of field edit for the specified field! No a'&e +dit is the default! *n general, you should use the same edit type that is used in the field record definition so that this edit type is consistent throughout /nterprise People"ools! 'hoose a heading type for the prompt from the following& e!t: "he prompt heading is the free text that you have entered in the text box! "# S$ort: "he prompt heading is the short name from the record definition! "# Long: "he prompt heading is the long name from the record definition!

#eading *ype

#eading *e't (isplays the label for the text box where you enter the comparison value! "o change the text, select e!t from the @eading "ype list box, and then enter the new label in the @eading "ext text box! &ni-ue Prompt !ame Prompt *a,le + default value that Query 1anager generates for globaliAation! <nly base language users can set this value to uni#uely identify a #uery prompt parameter! *f the edit type is %ro()t a'&e, you can select a Prompt "able to use! *f the edit type is rans&ate a'&e, the value in the drop%down list box determines the values used! PeopleSoft Query assumes that the specified field has translate table values associated with it, and that the field is identified as a translate table field in its

record definition! See PeopleSoft Query Security! !ote" When using a prompt table on a field from a record definition with multiple keys, you must prompt for all higher%level keys before lower%level keys! PeopleSoft Query needs values for the higher%level keys to generate the correct prompt list! 3ecause of this complication, it is unwise to use multikey prompt tables! See Also +dding 0ields to Query 'ontent

+efining #A/3!G Criteria


SQL does not support the use of aggregate functions in W@/9/ clauses! "herefore, once you have applied an aggregate function to a field, you cannot use that field in your selection criteria, which corresponds to a SQL W@/9/ clause! When you want to select rows based on the results of an aggregate function, Query 1anager enables you to create HA2IN3 criteria! ,ou might use such criteria, for example, when you want a list of the departments whose minimum salary is greater than O255,555! *n SQL, a @+7*)H clause is like a W@/9/ clause for rows of data that have been aggregated into a single row of output! "he system evaluates W@/9/ clauses by looking at the individual table rows 'e*ore they are grouped by the aggregate function, and then it evaluates @+7*)H clauses a*ter applying the function! So if you want to check the value returned by the function, you must define a @+7*)H criterion! When you click the +dd 'riteria icon from the 0ields or Query tabs for an aggregate field, new criteria is added to the @aving tab instead of the 'riteria tab! +dd selection criteria using the @aving tab in the same way you add selection criteria using the 'riteria tab! Geep in mind that PeopleSoft Query compares the result of applying the aggregate function to the comparison value!

+efining E'pressions
"his section provides an overview of /xpressions and shows you how to add or edit an expression!

Understanding %pressions
+!)ressions are calculations that PeopleSoft Query performs as part of a #uery! -se them when you must calculate a value that PeopleSoft Query does not provide by default (for example, to add the values from two fields together or to multiply a field value by a constant ! ,ou can treat an expression ;ust as if it were a field in the #uery& select it for output, change its column heading, or choose it as an Iorder byJ column! *n Query 1anager, you can use expressions in two ways& +s comparison values in selection criteria! +s columns in the #uery output!

diting %pression Properties


+ccess the /xpressions page!
/dit /xpression Properties page

"o add or edit expressions for #ueries& 2! Select 9eporting "ools, Query, Query 1anager, click the 'reate )ew Query link, and click the /xpressions tab to open the /xpressions page! 6! "he #uery name appears in the Query )ame field!

"he default for this field is New Unsaved Query until you change it on the Properties page! 4! 'lick +dd /xpression to open the /dit /xpression Properties page, where you can select expression types! :! Select an /xpression "ype from the drop%down list! *f you select -$aracter, enter the maximum length of the expression result in the Length field! *f you select Nu('er or Signed Nu('er, enter the total number of digits in the Length field and the number of digits after the decimal point in the (ecimal field! C! *f you are entering an aggregate value, such as S-1, +7H, or '<-)", select the +ggregate /xpression check box! D! *n the /xpression "ext field, enter the expression (for example, A. ota& 4 .1, where A represents the first record! Query 1anager inserts the expression into the SQL for you! ,ou can include <racle hints in PeopleSoft Query expressions as long as you adhere to the following rules& /xpressions containing a hint must begin with 546 /xpressions can contain only one hint! 0or example, only one set of 546 45 is allowed! /xpressions must contain a complete hint! 0or example, it can8t have only 546 or 45! 3oth must be in the same expression! E! 'lick +dd Prompt to add prompt properties for this expression$ click +dd 0ield to add another field to this expression! !ote" ,ou must define a prompt, as described in the next section, before you can add it to your expression! &sing .etaSQ) in E'pressions 1etaSQL enables you to enter an expression that can be used across any supported database! 0or example, to concatenate strings use the 1etaSQL P'<)'+", and /nterprise People"ools will convert it to the appropriate database string concatenation function! "o create a substring use PS-3S"9*)H! !ote" ,ou need to make sure that the expression type and length are set correctly for the data that is going to be returned! <nly the 1etaSQL functions that are valid for dyna(ic views will work with PeopleSoft Query! See Also 1eta%SQL

/nterprise People"ools F!:D People3ook& PeopleSoft Query

'opyright Q 2RFF%655C PeopleSoft, *nc! +ll rights reserved!

.odifying4 Scheduling4 and Organi5ing Queries


"his chapter discusses how to& 1odify #ueries! Schedule #ueries! <rganiAe #ueries

.odifying Queries

"his section discusses how to& <pen existing #ueries! 9ename #ueries! (elete #ueries! -pdate existing #ueries! +utomatically repair existing #ueries!

Opening %isting Queries


-se Query 1anager to open and view #ueries!
Query 1anager Search 9esults page

"o open an existing #uery from your browser& 2! Select 9eporting "ools, Query, Query 1anager! "he Query 1anager search page appears! 6! Search for a #uery using the basic or advanced search functions! 3oth search types enable you to select from the following searc$ 'y criteria& access group name, description, folder name, owner, #uery name, type, uses field name, and uses record name! "he basic search enables you to search using the 'egins wit$ condition! "he advanced search enables you to perform a progressively narrower search by using one or more searc$ 'y criteria and selecting from a choice of conditions for each searc$ 'y criterion! "he following provides instructions on using searc$ 'y criteria& "o perform a basic search by name, enter the name of the #uery in the Search by field and click the Search button! *f you do not know the name of the #uery and want to search through a list of #ueries, leave the Search for field blank and click the Search button to display a list of up to 455 #ueries! Perform a partial search by entering part of a #uery name or description in the Search by field! -se the drop%down list to search #ueries by either name or description! "hen click the Search button to display a list of #ueries that match your search criteria! "he Search 9esults page appears and lists all the #ueries that match the search criteria! "he following information appears& #uery name, #uery description, ownership (public or private *f you know the name of the #uery that you want, enter it in the Search by field and click the Search button! "o perform an advanced search, click the +dvanced Search link! <n the advanced search page, select the appropriate searc$ 'y criteria and conditions and enter a search string in each of the corresponding fields! "hen click the Search button to display a list of #ueries that match your search criteria! "he Search 9esults page appears, listing the #uery name, description, owner, and folder for all the #ueries that match the search criteria!

4! 'lick the /dit link on the row of the #uery that you want to modify! See Also 1eta%SQL

Renaming Queries
+ccess the +dmin page (People"ools, -tilities, +dministration, Query +dministration !
9ename Queries page

"o rename a #uery& 2! <n the +dmin page, choose a predefined search or a manual search by clicking the respective Search button! 6! Select the Queries from the Query List! 4! 'lick 9ename! "he 9ename Queries page appears, listing the current #uery names and #uery owners! :! /nter new names for the #ueries in the )ew )ame field! C! 'lick <G to save your changes! !ote" +lternatively, you can use the Query 1anager search page (9eporting "ools, Query, Query 1anager to rename a #uery! ,ou must first select a #uery that you want to rename then select "ena(e Se&ected from the +ction drop down list box!

$eleting Queries
,ou can delete any public #uery that you have access to as well as any private #uery that you have created! "o delete a #uery& 2! +ccess the +dmin page (People"ools, -tilities, +dministration, Query +dministration 6! <n the +dmin page, choose a predefined search or a manual search by clicking the respective Search button! 4! 'lick (elete! "he Query (elete 7erification page appears! :! 'lick 7es to confirm the deletion or No to avoid deletion! !ote" +lternatively, you can use the Query 1anager search page (9eporting "ools, Query, Query 1anager to delete a #uery! ,ou must first select a #uery that you want to delete then select De&ete Se&ected from the +ction drop down list box!

Updating %isting Queries


+t times you might want to update a #uery to reflect new conditions or copy an existing #uery and modify it for other uses! ,ou can open a #uery, examine it to see if it is suitable, and then use the Save +s function to save it with a new name! "o update an existing #uery& 2! <n the Query 1anager Search 9esults page, find the #uery that you want to modify and click its /dit link! "he 0ields page appears! 6! )avigate to the page that you would like to modify (except the 9un page ! 4! /nter the new information on the page! :! 'lick either the Save button to update the existing #uery, or click the Save +s link to save a different instance of the #uery under a new name!

Automatically Repairing %isting Queries


+ record definition used in a #uery may change! When this occurs, PeopleSoft Query automatically repairs the #uery when it is opened! + warning message informs the user about the problem and what actions were taken& Prob!em .ield deleted #ro( the record de#inition is a selected #ield. "ction The #ield is re(o+ed #ro( the selected list. /# the #ield is the only #ield selected, the %uery cannot "e sa+ed.

Prob!em .ield deleted #ro( the record de#inition is used in a pro(pt.

"ction o action taken. This does not a##ect the pro(pt unless the #ield has "een co(pletely re(o+ed #ro( the data"ase, and the pro(pt la"el is either a short or long translate. The #ield is re(o+ed #ro( the e$pression. This (ay result in an in+alid e$pression, "ut the %uery can "e sa+ed. The criterion is re(o+ed. /# criterion is a su"%uery criterion, all lo!er su"%ueries are deleted.

.ield deleted #ro( the record de#inition is used in an e$pression. .ield deleted #ro( the record de#inition is used in a criterion. Record deleted is the #irst record in the %uery. Record deleted is not the #irst record in the %uery.

Error returned. The %uery cannot "e repaired.

The record and all #ields are re(o+ed. Note. The actions speci#ied pre+iously #or deleted #ields apply. Record and all records )oined "elo! are re(o+ed. Note. The actions speci#ied pre+iously #or deleted #ields apply.

Record deleted contains hierarchy )oins "elo! it.

!ote" *f a record has been deleted, the #uery will no longer appear in the list of #ueries because you no longer have access to all of the records in that #uery! "o open such a #uery, you will need to use Query +P*! See Also Setting Query Permissions

Scheduling Queries
Query 1anager interacts with PeopleSoft Process Scheduler to let users schedule #ueries! "his section discusses how to& Submit process re#uests! Select process re#uests! -se Process 1onitor! 7iew output in 9eport 1anager! Specify a user>s language!

Su&mitting Process Re'uests


+ process re#uest enables you to submit a ;ob or process to run! "he Process 9e#uest page lets you specify such variables as where to run the process and in what format to generate the output based on a run control *(!
Scheduled Query 9un 'ontrol page

"o submit a process re#uest& 2! Select 9eporting "ools, Query, Schedule Query! "he Schedule Query Search page appears!

6! Search for and select an existing 9un 'ontrol *(, or select the +dd )ew 7alue tab to enter a new *(! "he Schedule Query page appears! 4! Select the #uery for which you want to schedule and update any prompt parameters! -se the -pdate Parameters link to select or change the value re#uired for each available prompt! When values have been selected, they appear in the Prompt )ame and 7alue fields! !ote" *f the #uery does not have any prompt, the -pdate Parameters link will not appear! !ote" *f you have one or more +sian languages installed, select the desired language from the +sian 0ont drop% down list box! "his drop%down list box appears on&y if you have one or more +sian languages installed! :! 'lick the Save button to save changes and remain on the Schedule Query page! C! 'lick the 9un button to display the Process Scheduler 9e#uest page! When scheduling #ueries from Query 1anager or Query 7iewer, the 9un button is replaced with an <G button! D! 'lick the Process 1onitor link to view the status of your re#uest$ click the 9eport 1anager link to view the output of your re#uest! See Submitting and Scheduling Process 9e#uests!

Selecting Process Re'uests


"he Process Scheduler 9e#uest page enables you to set the server, run date and time, how often the process runs (the recurrence of the process , output type, and format! "o select a process re#uest&
Process Scheduler 9e#uest page

2! <pen the Process Scheduler 9e#uest page! 6! 'omplete the fields on this page! Server !ame Recurrence Select the name of server on which you want the process to run! Select the recurring time intervals for the process to run! 0or example, to run a process every weekday at C&55 P!1!, select the predefined recurrence definition 89# at :)(. Select the time Aone in which the process will run! 0or example, you might be in /astern Standard "ime (/S" and schedule a process to run in Pacific Standard "ime (PS" ! Select the date on which you want the process to run! Select the time at which you want the process to run!

*ime 6one

Run +ate Run *ime

Reset to Current 'lick to reset the run date and time to the present date and time! +ate7*ime Select +escription Process !ame and Process *ype *ype Select a ;ob or process to run! ,ou can select multiple ;obs and processes! *dentifies a process or ;ob! Bobs are listed as links! 'lick the link to display the Bob (etail page, which shows all of the individual processes and ;obs that are associated with the selected main ;ob! *dentifies the name and type (such as '<3<L or 'rystal of the process as it appears in the process or ;ob definition! Select the output type for this ;ob or process& +n output type selected for a process at the process definition level overwrites the output type and the output type drop%down list box becomes unavailable! +n output type selected for a ;ob at the main ;ob level carries through to the ;ob items! +n output type selected for individual ;ob items overwrites the output type that is entered for the parent ;ob!

#i&e: Writes the output to the file that you indicate in the <utput (estination field! !ote" 0or PS.n7ision, the <utput (estination must contain the full path and the name of the file! %rinter: Sends the output to a printer! ,ou can enter a custom printer location in the <utput (estination field if you have the appropriate security access! *f the <utput (estination field is left blank, the printer that is defined on the Process Profile Permissions page is used! *f that printer is undefined, the default printer defined for the process scheduler is used! +(ai&: Sends the output through an email! "o distribute a report to an email list, enter the appropriate information on the (istribution (etail page by clicking the (istribution link! 3y default, the output is sent through email to the person running the process! "his option is available for SQ9, PS.n7ision, and 'rystal reports! ;e': Sends all output of the process to the report repository, including log and trace files! "he format of the report is specified by the format list! ;indow: Sends the output to a new browser window! "he status of the process now appears in the new browser window before displaying the results! "he different states can be Queued, Initiated, %rocessing, Success, +rror, or ;arning. +ll output for the process is also sent to the report repository, including log and trace files! "he format of the report is specified by the format list! When multiple processes are re#uested, a new browser window is opened for each re#uest! !ote" "his output type is not available if the user does not have 9/) Server "e)ort ;indow permission, or there is no active 9/) Server cluster available for 9eporting! "o grant access to the new browser window, the permission lists of the users must include full access for the 9ealtime /vent )otification for 9eporting Window and the W/3L*3=9P" web library with full access! ormat Select the output format for this ;ob or process! When an output format is selected for a process at the process definition level it cannot be changed! "herefore, output format drop%down list box becomes unavailable! !ote" +n output format selected for a ;ob at the main ;ob level carries through to the ;ob items! "he format selected for individual processes or ;obs that are attached to a ;ob override the format entered for the parent ;ob! +istri,ution 'lick the (istribution link to access the (istribution (etail page, where you enter additional distribution information when the output type is ;e', ;indow, or +(ai&. +lso use this page to select a folder name to which the output should be distributed when the output type is ;e' or ;indow.

4! 'lick <G to run the #uery! "he system displays the Schedule Query page! "he process instance number appears below the 9un button! :! 'lick the Process 1onitor link to view the status of your re#uest! "he Process List page appears! "he 9un Status field reveals the status of your scheduled or running process!

Using Process Monitor


Process 1onitor consists of two pages& the Process List page and the Server List page! "he Process List page lets you monitor the process re#uests you have submitted! ,ou can select filtering options (for example, process type and run status to view only selected process re#uests! +nd you can click the (etails link to view details associated with particular process re#uests! "he Server List page lets you monitor the PeopleSoft Process Scheduler server agents within your system!
Process 1onitor % Process List page

&ser 3+ *ype

7iew the processes submitted by a particular user *(! -sually, you view by your own user *(! 7iew by a particular process type (for example, A))&ication +ngine !

)ast

Specify an interval of time by which to limit the process re#uests that appear in the list! /nter a numerical value in the edit box preceding the drop%down list, and then select a unit type from the drop%down list! 7alues are& Days, Hours, or 8inutes. 'lick to check the current status of a process! "his button refreshes the list! Select to view processes run on a particular server! 7iew processes by a process name! Specify a range of instances by which to limit the process re#uests that appear in the list! "o limit the view to a single re#uest, enter the re#uired instance *( in the first text field! Select if you want to view processes by a specific status, such as Success or +rror. (isplays the distribution status for each individual ;ob and process! 7alid states are& N5A, None, 3enerated <1S=0.>, Not %osted, %osting, and %osted.! Select the check box to save filter criteria changes when you select the 9efresh button! (isplays the process instance$ that is, the order in which the process appears in the #ueue! "his number is automatically generated! "his field is blank$ it is not used for #uery processes! "he *( of the user who submitted the process! 'lick to open the Process (etail page!

Refresh Server !ame 3nstance Run Status +istri,ution Status Save on Refresh 3nstance Se-uence 8Se-"9 &ser +etails

Viewing Output in Report Manager


9eport 1anager is like your own personal inbox of reports and process output! *t provides a secure way to view report content, check the posting status of your output, and see content detail messages! 7iew all of your reports by opening your 9eport List in your browser! Select 9eporting "ools, 9eport 1anager, or click the 9eport 1anager link on the Schedule Query page!
List page

See Also -sing Process 1onitor Working With Processes and 9eports

Specifying a User(s !anguage


0or scheduled #ueries, the system uses the language specified in the user>s profile, not the language that is selected during sign%on! "he system also uses the international and regional settings that the user has specified using 1y PersonaliAations! *f you have not specified personal settings, the system uses the default installation international settings! !ote" 1ost PeopleSoft components can default to international settings from the browser if the user has not set any user specific settings! @owever, this is not available for scheduled #ueries or any PeopleSoft Process Scheduler processes! See Also +dministering -ser Profiles

Organi5ing Queries
"his section discusses how to& +dd #ueries to the 1y 0avorite Queries list! 'opy a #uery to another user8s list of #ueries!

1ove a #uery to an organiAation folder

Adding Queries to the My Fa"orite Queries !ist


"he Query 1anager and Query 7iewer search pages can include a list of #ueries called 8y #avorite Queries. *f you use certain #ueries often, you can put the #ueries in this list for easy access! !ote" +lthough you can view a list of favorites, you can8t create a list of favorites in the Query 7iewer! "o add a #uery to the 1y 0avorite Queries list& 2! <n the Query 1anager Search 9esults page, select the #uery that you want to add to the 1y 0avorite Queries list! 6! Select Add to #avorites from the +ction drop%down list box! 4! 'lick Ho! "he #uery appears in the 1y 0avorite Queries list group box ! !ote" ,ou can add multiple #ueries to the 1y 0avorite Queries list at once ;ust by selecting several #ueries before choosing Add to #avorites and clicking Ho!

Copying a Query to Another User)s !ist of Queries


"he Query 1anager allows you to copy a #uery from your list of #ueries to another user8s list of #ueries! !ote" ,ou can only copy nonpublic #ueries to another user8s list of #ueries! *f the target user does not have permission to access all of the records in a copied #uery, that #uery will not appear in the target user8s list of #ueries! <nce permission has been granted, the #uery will then appear in the list! "o copy a #uery to another user8s list of #ueries& 2! <n the Query 1anager Search 9esults page, select the #uery or #ueries that you want to copy! 6! Select -o)y to User from the +ction drop%down list box! 4! 'lick Ho! "he /nter -ser *( page appears! :! /nter the user *( of the user to whom you would like to copy the #uery! C! 'lick <G!

Mo"ing a Query to a Folder


<rganiAing #ueries in folders can help you more easily access the #ueries! "o move a #uery to a folder& 2! <n the Query 1anager Search 9esults page, select the #uery or #ueries that you want to move to an organiAation folder! 6! Select 8ove to #o&der from the +ction drop%down list box! 4! 'lick Ho! "he 1ove to 0older page appears! :! Select one of the following& Se&ect an e!isting *o&der to (ove to: 0rom the drop%down list box, select the folder to which you want to move the #ueries! 1" enter a *o&der na(e to (ove to: /nter the name for a new folder to which you want to move the #ueries!

C! 'lick <G!

/nterprise People"ools F!:D People3ook& PeopleSoft Query

'opyright Q 2RFF%655C PeopleSoft, *nc! +ll rights reserved!

:or%ing with Advanced Query Options


"his chapter discusses how to& Work with aggregate functions! Work with sub#ueries! Work with unions! Boin records!

!ote" 0amiliarity with Structured Query Language (SQL is helpful when writing more advanced #ueries!

:or%ing with Aggregate unctions


"his section provides an overview of aggregate functions and discusses how to apply an aggregate function to a field!

Understanding Aggregate Functions


*n a standard #uery, each row in the result set corresponds to an individual row in the table that you are #uerying! Sometimes, however, you instead want a summary of the information in multiple rows! 0or example, you might want to know how many customers you have in each state! ,ou can #uery for this kind of summary information using aggregate *unctions. +n aggregate function is a special type of operator that returns a single value based on multiple rows of data! When your #uery includes one or more aggregate functions, PeopleSoft Query collects related rows and displays a single row that summariAes their contents! 0or example, suppose that your <rder table includes (among other fields a customer *( and an amount for each item ordered! ,ou would like to find out how much each customer has ordered, so you create a #uery that selects the customer *( and amount fields! Without any aggregate functions, this #uery would return the same number of rows as there are in the table! *f Stuart Schumacher ordered 25 items, you would see 25 rows with his *( in the customer *( column! <n the other hand, if you apply the aggregate function Sum to the amount field, you will get ;ust one row for each customer *(! PeopleSoft Query collapses all the rows with the same value in the nonaggregated column (customer *( into a single row! "he value of the amount field in Stuart Schumacher>s row would be the sum of the values from the 25 rows! "he following table lists the aggregate functions that you can apply to a field using PeopleSoft Query& "ggregate #unction Su( Count Min Ma$ '+erage "ction 'dds the +alues #ro( each ro! and displays the total. Counts the nu("er o# ro!s. Checks the +alue #ro( each ro! and returns the lo!est one. Checks the +alue #ro( each ro! and returns the highest one. 'dds the +alues #ro( each ro! and di+ides the result "y the nu("er o# ro!s.

Applying an Aggregate Function to a Field


When you apply an aggregate function to a field, you are redefining how PeopleSoft Query uses the field throughout the #uery! /ssentially, PeopleSoft Query replaces the field, wherever it occurs, with the results of the function! *f you select the field as a display column, PeopleSoft Query displays the aggregate values$ if you use the field as an order by column, PeopleSoft Query orders the results based on the aggregate values! !ote" *f you do not want PeopleSoft Query to redefine the field in this wayKfor example, if you want to display both the individual row values and the results of the aggregate functionKcreate an expression that includes the aggregate function rather than applying the function directly to the field! "o apply an aggregate function to a field& 2! *n Query 1anager, select the 0ields tab! 6! 'lick the /dit button associated with the appropriate field! "he /dit 0ield Properties page appears! 4! Pick the aggregate function that you want to use for this field, and click <G! "he abbreviation for the selected function appears in the +gg column! *f a function is not available for the field you have selected, the /dit 0ield Properties page does not close! 0or example, you cannot use Su( with a character field, but you can use-ount, 8in,and 8a!! !ote" *n addition to the previously listed aggregate functions, you can use any aggregate function supported by the underlying database by creating an expression component! See Also (efining /xpressions

:or%ing with Su,-ueries


+ su',uery,sometimes called a su'9S+L+- , is a #uery whose results are used by another #uery! "he main #uery uses the sub#uery>s result set as a comparison value for a selection criterion! ,ou create a sub#uery when you need to compare a field value to the results of a second #uery! Suppose, for example, that you want a list of employees who are not members of any professional organiAations! 0or each employee in the P/9S<)+L=(+"+ table, you must find out whether their employee *(s are in the 1/13/9S@*P table! *n other words, you must compare the value in the P/9S<)+L=(+"+!/1PL*( field to the results of a sub#uery that selects the /1PL*( values from the 1/13/9S@*P table! 0ollowing are examples of the 'riteria page when using a sub#uery and the Query page when creating a sub#uery&
-sing a Sub#uery Sub#uery S Query page

"o create sub#ueries& 2! 0rom the /dit 'riteria Properties page, select Sub#uery as the comparison value! PeopleSoft Query displays a special Query 1anager view where you can select a record! See Sub#uery T Query page above! 6! 0rom the Sub#uery % Query page, select the re#uired field! !ote" + sub#uery can have only one field! @owever, you can create multiple sub#ueries! When you have defined sub#ueries and unions, a Sub#uery.-nion )avigation link appears at the top each page of the main #uery and the sub#ueries! 4! 'lick the Sub#uery.-nion )avigation link to display a hierarchical view of the main #uery and all sub#ueries and unions!

-se the hierarchy to navigate between the main #uery, sub#ueries, and unions!

:or%ing with &nions


-nions enable you to get the results from two or more separate #ueries at the same time! ,ou can create a union of multiple #ueries only when the #ueries have the following common elements& "he same number of selected fields! "he same data types for all fields! "he same display order for the columns!

!ote" "ranslate values, long or short description, cannot be displayed in a union #uery! <nly the code for the field can be selected for output display! ,ou must understand SQL to ensure that you create logical union #ueries! "o create a union& 2! 'lick the )ew -nion link! (*t is available on the bottom of each Query 1anager page except for the 9un page! PeopleSoft Query automatically switches to the 9ecords tab so that you can start defining the second #uery! (efine that #uery in the same way that you define other #ueries! When you>re working on a union, each individual selection looks like an independent #uery, and for the most part they are independent! @owever, the first selection in the unionKthe one you started before clicking the )ew -nion linkKhas a special status! PeopleSoft Query determines the ordering of the rows and columns based on what you specify for the first selection! *t also uses the column headings defined for the first selection! 6! )avigate between the main #uery, sub#ueries, and unions using the Sub#uery.-nion )avigation link!

$oining Records
Query 1anager enables you to create #ueries that include multiple%table joins. Boins 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! Boins are what make relational databases relational! -sing ;oins, you define relationships among fields when you #uery the records, not when you create the records! 3ecause PeopleSoft records are highly normaliAed (they each describe one kind of entity , it is easy to use Query 1anager to create ;oins! "he procedure for ;oining tables differs depending on how the tables being ;oined are related to each other! Query 1anager recogniAes three types of ;oins& record hierarchy, related record, and any record! "his section discusses how to& 'reate record hierarchy ;oins! 'reate related record ;oins! 'reate any record ;oins! 'reate outer ;oins! 'reate left outer ;oins!

Creating Record *ierarchy +oins


+ record hierarchy ;oin ;oins a parent table to a child table! (+ c$i&d ta'&e is a table that uses all the same key fields as its parent, plus one or more additional keys! Specify the parent.child relationship using the Parent 9ecord )ame option in PeopleSoft +pplication (esigner!

Selecting the second record

"o create a record hierarchy ;oin& 2! 'hoose the base record for your #uery and select the appropriate fields and criteria! 6! 0rom the Query page, click the @ierarchy Boin link! +ll of the records that have a parent.child relationship with your selected record appear! 4! Select the second record for the ;oin! *n our example, we are selecting +3S/)'/=@*S"! "he ;oin is reflected on the Query page!

Creating Related Record +oins


*n a related record ;oin, you can automatically ;oin two records based on a relationship that has been predefined in the record designer! 0or example, if a field has a prompt table defined for it, PeopleSoft Query displays a ;oin link to the right of the shared field! "he following example shows that you can ;oin the Q/(1< /mployee record to the Bob'ode record by using the Q/=B<3'<(/ field, or you can ;oin the Q/(1< /mployee record to the (ata (epartment "able by using the (/P"*( field&
Query page showing related record ;oin links

"o create a related record ;oin& 2! 'hoose the base record for your #uery and select the appropriate fields and criteria! 6! 0rom the Query page, click the 9elated 9ecord Boin link! 4! 0rom the Select Boin "ype page, select the standard ;oin option and click <G! "he ;oin is reflected on the Query page!

Creating Any Record +oins


-sing Query 1anager, you can create a ;oin between two records (any record ;oin by selecting your initial base record, defining its output fields and associated criteria, and then returning to the 9ecords page to select the second record! When you return to the 9ecords page, you will see the link Boin 9ecord rather than +dd 9ecord to the right of all listed record names! *f you have the /nable +uto Boin preference selected in the Query Preferences page, PeopleSoft Query automatically attempts to ;oin the new record to the existing record by looking for matching columns on the two records! "o navigate to the Query Preferences dialog, click the Preferences link!

Creating Outer +oins


+n outer ;oin forces a row from one of the participating tables to appear in the result if there is no matching row! !ote" ,ou can only create an outer ;oin using this method if you have an <racle F database! *f you use a platform other than <racle F, you can create an outer ;oin e#uivalent or create a left outer ;oin using PeopleSoft Query8s left outer ;oin feature! See 'reating Left <uter Boins!

"o create an outer ;oin, you must include a plus sign in parentheses <6> after the key fields of the subordinate record in the criteria that link the records! "o produce this syntax, you cannot use the predefined ;oins! ,ou must perform an any record ;oin and code an expression that contains the (U instead of a field! 0ollowing is an example of the (efine /xpression page&
(efine /xpression page

Creating an Outer $oin for Oracle ; "o create an outer ;oin for <racle F& 2! 0rom the 'riteria page, click the /dit button to the right of the re#uired field from the primary record! 6! *n the 'ondition "ype <perator field, accept the value of +,ua& o, and in the /xpression 6 "ype field, accept the value of +!)ression. "he (efine /xpression page appears! 4! 'lick +dd 0ield! :! Select the re#uired field from the secondary record! C! 1anually enter <6> after the field name! D! 'lick <G! Creating an Outer $oin E-uivalent for non<Oracle ; Platforms *f you use a platform other than <racle F, use this method to achieve the same effect as an outer ;oin! !ote" *f you use a platform other than <racle F, you can also create a &e*t outer ;oin using PeopleSoft Query8s left outer ;oin feature! See 'reating Left <uter Boins! 0or example, to retrieve a list of all students and any evaluation information on file, the first select must retrieve those students who have not completed an evaluation$ the second select must retrieve those students who have completed an evaluation! "o perform an outer ;oin e#uivalent for the previous example& 2! -sing the Student=(ata record, select -usto(er?ID and Na(e. 3ecause you will be selecting two different fields from the Student=/val record and you want them to have their own columns, you must create two dummy fields for your first record! 6! 'reate two different expressions and select them for output! 4! Save the #uery! :! 'reate your sub#uery to find those students who have not completed an evaluation! "his completes your first select! *f you run the #uery at this point, you will see only those students who did not completed an evaluation! C! "o ;oin in the students who did complete an evaluation, create a union! D! -sing the Student=(ata record, select -usto(er?ID and Na(e for output! E! Boin the Student=/val record using a record hierarchy ;oin! F! Select -ourse and -ourse?"t for output!

Creating !eft Outer +oins


PeopleSoft Query enables you to easily create a left outer ;oin! *n a left outer ;oin, all rows of the first (left record are present in the result set, even if there are no matches in the ;oining record! !ote" "his feature is not available for the <racle F platform!

"o create a left outer ;oin on a new #uery& 2! <n the Query 1anager search page, click the 'reate )ew Query link! 6! <n the 9ecords page, search for the first (left record for the left outer ;oin! 4! 'lick the +dd 9ecord link on the same row as the record you would like to add! "he Query page appears! :! Select the appropriate fields to add to the #uery! C! )avigate to the 9ecords page! D! 0ind the ;oining record and then click the Boin 9ecord link on the same row as that record! E! Select Boin to get additional fields only (Left outer ;oin ! !ote" When you select Left outer ;oin, you must select the last record that you8ve previously added to the #uery! *f you attempt to ;oin to records other than the last record, an error message appears! F! 'omplete the ;oin! *f the /nable +uto Boin preference is selected in the Query Preference page, click the record name to ;oin with! *f the /nable +uto Boin preference is not selected in the Query Preference page, click <G!

R! (efine the ;oin criteria! *f the /nable +uto Boin preference is selected, the +uto Boin 'riteria page displays! ,ou may deselect the criteria from the #uery! ,ou may also click +dd 'riteria to add or edit criteria or conditions (6S4 tier client only ! *f there are no common keys between the two ;oin records, a message appears instead of the +dd 'riteria page! *f the /nable +uto Boin preference is not selected, the +uto Boin 'riteria page does not appear! *f desired, navigate to the 'riteria page to add criteria to the <n clause of the outer ;oin! "he "his criteria belongs to drop%down list box specifies where the criteria will appear! Select the alias that corresponds to this ;oin record! 25! (efine the effective date criteria! (6S4 tier client *f the ;oined record is an effective%dated record, the /ffective (ate 'riteria page appears! ,ou may accept the defaults or change them as desired! (:Stier PeopleSoft Pure *nternet +rchitecture *f the ;oined record is an effective dated record, a message appears stating that an effective date criteria has been automatically added! *f desired, you may navigate to the 'riteria page to change the defaults for this criteria! 22! "o ensure that the left outer ;oin completed successfully, you may navigate to the Query page! "ext for the ;oined records confirms a successful left outer ;oin! !ote" *f you use PeopleSoft Query with the (36 -(3 platform, the (36 -(3 platform will not allow you to have a sub#uery in the <) clause of a left outer ;oin! 0or example&
SELECT A.ROLENAME, A.DESCR FROM (PSROLEUSER B LEFT OUTER JOIN PSOPRDEFN C ON B.ROLEUSER IN (SELECT F.OPRID FROM PSOPRDEFN F WHERE F.OPRID IN ('AMA1','AMA2','AMA3')))

"his code yields the following error message& SQL.==@N An 1N c&ause associated wit$ a A1IN o)erator or in a 8+"3+ state(ent is not va&id. Adding )eft Outer $oins Criteria into the O! Clause

*f you want to create criteria for the left outer ;oined record, you can add left outer ;oins criteria into the <) clause! "o create left outer ;oins criteria into the <) clause& 2! <n the 'riteria page, click the /dit button to access the /dit 'riteria Properties page! 6! <n the /dit 'riteria Properties page, select 1N c&ause o* outer join BA&ias Na(eC from the "his 'riteria 3elongs to drop%down list box! 4! 'lick <G!

Anda mungkin juga menyukai