You are on page 1of 157

PeopleSoft Query Manager

End User Training Guide

ContactInformation: SpearMCConsulting 1866SPEARMC www.spearmc.com


CHAPTER1GETTINGSTARTED..................................................................................................................1 OVERVIEWOFQUERYMANAGER................................................................................................................. 1 COURSEOBJECTIVES.....................................................................................................................................1 ACCESSINGPEOPLESOFTQUERY................................................................................................................... 1 CHAPTER2ACCESSINGQUERYMANAGER................................................................................................3 EXPLORINGQUERYMANAGERPAGES.......................................................................................................... 3 QUERYMANAGERCOMMONACTIONS...................................................................................................... 27 CHAPTER3WORKINGWITHEXISTINGQUERIES......................................................................................33 SEARCHINGFOREXISTINGQUERIES........................................................................................................... 33 MANAGINGQUERIES..................................................................................................................................39 CHAPTER4WORKINGWITHRECORDS...................................................................................................47 SEARCHINGFORRECORDS.......................................................................................................................... 47 PREVIEWINGFIELDS....................................................................................................................................50 ADDINGRECORDS.......................................................................................................................................52 DELETINGRECORDS....................................................................................................................................52 CHAPTER5WORKINGWITHFIELDS.......................................................................................................53 ADDINGFIELDS............................................................................................................................................53 CHANGINGCOLUMNDISPLAYORDER........................................................................................................ 54 DEFININGSORTORDER............................................................................................................................... 57 CHANGINGCOLUMNHEADINGS................................................................................................................. 60 APPLYINGAGGREGATEFUNCTIONS........................................................................................................... 62 DELETINGFIELDS.........................................................................................................................................66 CHAPTER6WORKINGWITHCRITERIA...................................................................................................67

SpearMCQueryManagerTrainingGuide

DEFININGCRITERIA.....................................................................................................................................67 WORKINGWITHMULTIPLECRITERIA .......................................................................................................... 75 DEFININGDISTINCTCRITERIA..................................................................................................................... 82 EDITINGCRITERIA........................................................................................................................................83 DELETINGCRITERIA.....................................................................................................................................84 CHAPTER7BUILDINGPROMPTS.............................................................................................................85 CREATINGPROMPTS...................................................................................................................................85 ADDINGPROMPTSTOCRITERIA................................................................................................................. 87 DELETINGPROMPTS....................................................................................................................................88 CHAPTER8BUILDINGEXPRESSIONS......................................................................................................89 DEFININGEXPRESSIONS.............................................................................................................................. 89 DEFININGAGGREGATEFUNCTIONS............................................................................................................ 97 ADDINGEXPRESSIONSTOCRITERIA .......................................................................................................... 101 DELETINGEXPRESSIONS............................................................................................................................ 101 CHAPTER9BUILDINGSUBQUERIES....................................................................................................103 DEFININGASUBQUERY............................................................................................................................. 103 CHAPTER10BUILDINGLISTOFVALUES................................................................................................109 DEFININGLISTOFVALUES ......................................................................................................................... 109 DELETINGLISTOFVALUES........................................................................................................................ 113 CHAPTER11UNDERSTANDINGJOINS..................................................................................................115 CREATINGHIERARCHYJOINS.................................................................................................................... 115 DELETINGHIERARCHYJOINS..................................................................................................................... 117 CREATINGRELATEDRECORDJOINS.......................................................................................................... 117 DELETINGRELATEDRECORDJOINS........................................................................................................... 121

SpearMCQueryManagerTrainingGuide

CREATINGANYRECORDJOINS.................................................................................................................. 121 CHAPTER12SAVINGQUERIES.............................................................................................................129 SAVINGANEWQUERY.............................................................................................................................. 130 SAVINGCHANGES ......................................................................................................................................130 SAVINGACOPY.........................................................................................................................................130 CHAPTER13RUNNINGQUERIES..........................................................................................................131 USINGPROMPTS.......................................................................................................................................131 RUNNINGTOHTML...................................................................................................................................132 RUNNINGTOEXCEL...................................................................................................................................139 PREVIEWING..............................................................................................................................................143 CHAPTER14FINANCIALSDESKTOPREFERENCE...................................................................................147 DEFININGEXCELFILETYPES...................................................................................................................... 147 PLANNINGGUIDEFORBUILDINGQUERIES ............................................................................................... 149 APPENDIXTABLESUSEDFORREPORTING..........................................................................................151

SpearMCQueryManagerTrainingGuide

CHAPTER1GETTINGSTARTED
OVERVIEWOFQUERYMANAGER
WelcometoPeopleSoftQueryManagerBasics!Thismanualcontainsthetoolsneededtolearnthe conceptsandproceduresinvolvedincreatingandrunningqueriesinPeopleSoftQueryManager.Userswill learnthebasicfunctionsofQueryManagerincluding,searchingforpredefinedqueries,creatingnew queries,managingqueries,runningqueries,andexportingqueryresults.

COURSEOBJECTIVES
Bytheendofthiscourse,usersshouldhavethetoolsandinformationnecessaryto: AccessQueryManager NavigateQueryManager FindExistingQueries ManageQueries CreateandModifyQueries RunQueries

ACCESSINGPEOPLESOFTQUERY
PeopleSoftdatabasesareaccessedthroughaninternetwebbrowser.ThefollowingURLscurrentlyprovide accesstotheFinancialApplications.EntertheURLintheAddressfieldofthewebbrowser.Contacta supervisorforupdatedaddressesforproduction,reporting,qualityassurance,andusertrainingpurposes. ** SPECIFIC TO CLIENT SYSTEM**

AddPeopleSoftdatabaseURLstothewebbrowsersFavoritesFolderforeasyaccessto PeopleSoftdatabases. Queryoptionsdisplaybasedonuserrolesandsecurity.ToaccessPeopleSoftQueryfunctions,expandor doubleclickReportingToolsintheNavigationMenu.TheQueryfoldercontainslinkstoQueryManager, QueryViewer,andQueryScheduler. QueryManager:Allowsuserstocreatenewqueries,modifyexistingqueries,andschedulequeriestorun atalaterdate. QueryViewer:Providesreadonlyaccesstopredefinedqueries.Userscansearch,run,print,and downloadquerydata. QueryScheduler:Allowsuserstomanagequeriesscheduledtorunatalaterdate.

SpearMCQueryManagerTrainingGuide

Page1

INTENTIONALLYLEFTBLANK

Page2

SpearMCQueryManagerTrainingGuide

CHAPTER2ACCESSINGQUERYMANAGER
ToopenQueryManager,navigatetoReportingToolsandaccessQuery.AccesstoQueryManagerandits functionsisbasedonusersecurity.Someoptionsmaynotbeavailabletoallusers. CollapsetheNavigationMenuwhileworkinginamoduletoviewtheentirePeopleSoft page.ExpandtheNavigationMenutonavigatetoadifferentmodule.

QueryManageropensinquerysearchmode.FromthemainQueryManagerPage,userssearchforan existingqueryusingBasicorAdvancedSearch,andcreatenewqueries

EXPLORINGQUERYMANAGERPAGES
QueryManagerisorganizedasagroupofpages.Thepagesopenwhenaccessinganexistingquery,and whenbuildinganewquery.Eachpageservesafunctionwhencreating,modifying,orreviewingqueries.

SpearMCQueryManagerTrainingGuide

Page3

RecordsPage
TheRecordsPageprovidesBasicandAdvancedSearchestofindrecordsinthePeopleSoftdatabase.The RecordsPageprovidessearch,preview,andjoinfunctionality. AccesstheRecordsPageto: SearchforRecords PreviewFields Add/JoinRecords

RecordsSearchInformation QueryNameandDescription:Thenameanddescriptionforanexistingquerydisplaysatthetopof thepage.Whencreatinganewquery,NewUnsavedQuerydisplaysfortheQueryName,anda Descriptionwillnotdisplay. SearchBy:TheBasicSearchandAdvancedSearchprovidethefollowingcategoriestoguidea recordsearch:

Page4

SpearMCQueryManagerTrainingGuide

AccessGroupName:Providesalistofrecordsbasedonsecurityaccesstotableinformation. ContainsFieldName:Providesalistofrecordscontainingaspecificfield. Description:Providesalistofrecordswithakeywordcontainedintherecordsdescriptivename. RecordName:Providesalistofrecordsbasedontherecordsdatabasename. BasicSearch:TheBasicSearchassumesthatthecriteriaenteredwillbefoundatthebeginningofthe informationrequested.Leavingthecriteriafieldblankreturnsallrecords.Usewildcardstoexpandthe searchbeyondtheBeginswithcondition. ANoteonWildcardsUsewildcardsasplaceholdersfordatawhen conductingasearch.ThemostcommonlyusedwildcardinPeopleSoftis the%symbol. %value:Searchesfordatacontainingthewordvalueattheendofadata string. %value%:Searchesfordatacontainingthewordvaluewithinadata string. value%:Searchesfordatacontainingthewordvalueatthebeginningof adatastring. AdvancedSearch:Opensasearchpageallowingtheuseofconditionaloperatorstoexpandtheflexibility ofsearchingforrecords.AdvancedSearchusesthesamefieldsfortheSearchByoptionsastheBasic Search.AccessConditionalOperatorsfromthedropdownlist.

SpearMCQueryManagerTrainingGuide

Page5

< <= = > >= Beginswith Between Contains In

Resultsarelessthanthecriteriaentered. Resultsarelessthanorequaltothecriteriaentered. Resultsareexactlyequaltothecriteriaentered. Resultsaregreaterthanthecriteriaentered. Resultsaregreaterthanorequaltothecriteriaentered. Resultsbeginwiththecriteriaentered. Resultsfallwithinandincludetherangeentered.Separaterangewithcommas. Resultscontainsomeformofthecriteriaentered.Enteringbegwouldreturn Beginning,Beg.,etc. Resultspresentedhaveoneormoreofthecriteriaentered.Separatecriteriawith commas.EnteringLedgerandBankwouldproduceresultscontainingeitherledger orbank. Resultsdonotincludethecriteriaentered.EnteringLedgerwillpreventLedger fromreturning.

Not=

RecordsResultsInformation Recordsmeetingthecriteriaenteredreturnsinalist.Fromtheresults,addrecordstothequery,or previewthefieldscontainedwithintherecord.

Page6

SpearMCQueryManagerTrainingGuide

Recname:Displaysthenameanddescriptionoftherecordretrievedbythesearch. AddRecord/JoinRecord:Addstherecordtothequery.AddRecordopenstheQueryPagetoaddfieldsto thequery.Afterthefirstrecordisadded,AddRecordchangestoJoinRecord.Eachtimeanewrecordis needed,navigatetotheRecordstabtosearchandjoinarecord. ShowFields:Previewsthefieldscontainedintherecord.Previewingthefieldshelpsdetermineifthe recordwillmeettheneedsofthequery.

SpearMCQueryManagerTrainingGuide

Page7

Key:Akeyfieldisauniqueidentifierinarecord.Therecanbeasingleormultiplekeyfieldsfor eachrecord.AkeyfielddisplaysYinthecolumnnexttothefieldname.Usingallkeyfields preventstheretrievalofduplicaterowsofdata.Forexample,omittingtheEffectiveDatekeyfield fromaqueryretrievesmultiplerowsoflikedata,eachwithadifferentEffectiveDate. Description:Displaysthefieldnameandthedescriptionofthedatafield.

Page8

SpearMCQueryManagerTrainingGuide

QueryPage
TheQueryPagedisplaysrecordsselectedforthequeryandfieldscontainedwithintherecords.Afolder withanaliasnamerepresentseachrecord.Therecordfoldersexpandtodisplayfields.Afieldusedforthe queryhasacheckmarknexttoitsname.NavigatebetweentheRecordsPageandQueryPagetoadd additionalrecordsandfields. AccesstheQueryPageto: AddFields CreateRecordJoins CreateHierarchyJoins AddCriteria DeleteRecords

SpearMCQueryManagerTrainingGuide Page9

QueryPageInformation QueryNameandDescription:Thenameanddescriptionforanexistingquerydisplaysatthetop ofthepage.Whencreatinganewquery,NewUnsavedQuerydisplaysfortheQueryName,anda Descriptionwillnotdisplay. RecordNameandDescription:Thenameofeachrecordaddedtothequerydisplayswitha foldericon.Expandandcollapsethefoldertoviewandhidethefieldscontainedineachrecord. Thealphacharacterbeforetherecordnamerepresentsanaliasname.Thesystemassignsanalias nametodistinguishfieldshavingthesamenameinmultiplerecords. FieldNameandDescription:Thenameanddescriptionoffieldscontainedinarecorddisplaywhen arecordfolderisexpanded. KeyField:Indicatesthefieldisauniqueidentifierforeachrecord. SortFields:Sortsthefielddisplayinalphabeticalorder.Toremovethesort,clicktheicon again. HierarchyJoin:Joinsaparentandchildrecord.AHierarchyJoinlinkdisplaysforeachrecordinthe query. DeleteRecord:Removesarecordfromthequery. SelectFields:Addsandremovesfieldsfromthequery.CheckAllFieldsselectsallfieldsforthe query.UncheckAllFieldsremovesthefieldselections. RelatedRecordsJoin:Joinsrelatedrecordswithcommonfields.Ifafieldhasarelationshipwith anotherrecord,ajoinlinkdisplaysnexttothefield. ExpandAllRecords/CollapseAllRecords:Expandsandcollapsesfoldersformultiplerecords. AddCriteria:OpenstheCriteriaPagetoaddfilterconditionstothefield.

Page10

SpearMCQueryManagerTrainingGuide

ExpressionsPage
TheExpressionsPageisusedtocreatecalculationsusingStructuredQueryLanguage(SQL).Expression resultscanbedisplayedasacolumninthequery,orusedaspartofthequerycriteria. AccesstheExpressionsPageto: BuildExpressions AddExpressionstoaQuery AddExpressionstoCriteria EditExpressions DeleteExpressions

ExpressionsPageInformation QueryNameandDescription:Thenameanddescriptionforanexistingquerydisplaysatthetopof thepage.Whencreatinganewquery,NewUnsavedQuerydisplaysfortheQueryName,anda Descriptionwillnotdisplay. AddExpression:OpenstheEditExpressionPropertiesPageforexpressiondefinition. ExpressionText:DisplaysthelogicdefinedintheEditExpressionPropertiesPage. UseasField:Addstheresultsoftheexpressiontothequeryresults. AddCriteria:OpenstheEditCriteriaPropertiesPagetocreateacriteriastatementbasedonthe expressionresults. Edit:OpenstheEditExpressionPropertiesPagetomodifyanexistingexpression. Delete:Removesanexpressionfromthequery.

SpearMCQueryManagerTrainingGuide

Page11

EditExpressionProperties

ExpressionType:Createexpressionsusingcharacter,number,anddatefields. Length:Thedigit/characterlengthfortheexpressionresults. Decimals:Thenumberofdigitstodisplayafterthedecimalinanumericexpression. AggregateFunction:DefinestheexpressionasacalculationusingaSQLfunction. AddField:Addsafieldtotheexpression. AddPrompt:Addsaprompttotheexpressionifthecalculationreliesoninformationenteredbya user.

Page12

SpearMCQueryManagerTrainingGuide

PromptsPage
Promptsallowuserstoenterdatatofilteraquery.Creatingpromptsexpandstheuseofaquerybeyond theneedsofasingleuser.Forexample,addingpromptsforBusinessUnitandDateRangeexpandstheuse ofageneralledgerqueryforusebyallbusinessunits. AccessthePromptsPageto: DefinePrompts EditPrompts DeletePrompts

PromptsPageInformation QueryNameandDescription:Thenameanddescriptionforanexistingquerydisplaysatthetopof thepage.Whencreatinganewquery,NewUnsavedQuerydisplaysfortheQueryName,anda Descriptionwillnotdisplay. AddPrompt:OpenstheEditPromptPropertiesPagetodefineanewprompt. Prompt:Displaysthenamesofsavedprompts. Edit:OpenstheEditPromptPropertiesPagetomodifyanexistingprompt. Delete:Removesthepromptfromthequery.

SpearMCQueryManagerTrainingGuide

Page13

EditPromptProperties

FieldName:Definesthefieldusedforthepromptcomparison. Type:Definesthedataformatofthefieldselected.Formatsincludecharacter,number,anddate. Theinformationforthisfieldautopopulatesbasedonthedatabasedefinitionforthefield. Format:Definesthedataformatforthefieldandprompt.Thisfieldautopopulatesbasedonthe databasedefinitionforthefield. Length:Definesthelengthofthecharacterornumberforthefieldandprompt.Thisfieldauto populatesbasedonthedatabasedefinitionforthefield. Decimals:Definesthedecimalplacementforanumberfieldandprompt.Thisfieldautopopulates basedonthedatabasedefinitionforthefield. EditType:Definesthetypeoffieldeditfortheprompt.Thisfieldautopopulatesbasedontheedit typedefinedforthefieldonthedatabase. HeadingType:Definesthetextdisplayedwhenthepromptispresentedtotheuser. HeadingText:DefineslabelforthepromptwhenHeadingTypeofTextisselected. UniquePromptName:Thesystemassigneduniqueidentifierfortheprompt. PromptTable:Definesthedatabasetabletobeusedwhencomparingdataenteredbytheuser withthefield.

Page14

SpearMCQueryManagerTrainingGuide

FieldsPage
TheFieldsPageprovidesinformationregardingtheindividualfieldsselectedtodisplayinthequeryresults. AccesstheFieldsPageto: DefineCriteria DefineExpressions EditColumnHeadings DefineSortOrder DefineColumnDisplayOrder DeleteFieldsfromtheQuery

FieldsPageInformation QueryNameandDescription:Thenameanddescriptionforanexistingquerydisplaysatthetopof thepage.Whencreatinganewquery,NewUnsavedQuerydisplaysfortheQueryName,anda Descriptionwillnotdisplay. Column:Designatesthedisplayorderofthefieldsinthequeryresults. Record.Fieldname:Displaystherecordandfieldname. Format:Displaysthedatabaseformatdefinitionforthefield. Ord:Displaysthesortorderforthefield.Ifdescendingsortorderisdefined,Dwillalsodisplayin thiscolumn. SpearMCQueryManagerTrainingGuide Page15

XLAT:DisplaysthevaluetoappearinthequeryresultswhenaTranslateTableisused.. Nindicatesnovaluewilldisplayinthequeryresults. Sindicatesthecode,orshortvalue,willdisplayinthequeryresults. Lindicatesthecodedescription,orlongvalue,willdisplayinqueryresults. Agg:DisplaystheAggregateFunctiondefinedforafield. HeadingText:Displaysthecolumnheadingusedinqueryresults. AddCriteria:Definesfiltercriteriausingthefield.Ifthefieldhasanexpressiondefined,theEdit HavingCriteriaPropertiesPagewilldisplay.Ifthefielddoesnothaveanexpressiondefined,the EditCriteriaPropertiesPagewilldisplay. Edit:OpenstheEditFieldPropertiesPagetodefineaggregatefunctions,columndisplayorder, columnheadings,andsortorderforthefield. Delete:Removesthefieldfromdisplayinginqueryresults. Reorder/Resort:OpenstheEditFieldOrderingPagetochangethecolumndisplayanddatasort order. EditFieldProperties

FieldName:Displaysthealiasnameofthefieldbeingmodified. Column:Defineswhichcolumnthedataappearsinthequeryresults. OrderByNumber:Definesthesortorderforthefield. Descending:Definesascending/descendingsortorderforthefield. Page16 SpearMCQueryManagerTrainingGuide

Heading:Definesthecolumnheadingtodisplayinqueryresults. HeadingText:DefinesthecolumnheadingtodisplayiftheTextoptionisselected. UniqueFieldName:Displaysthealiasnameofthefield. Aggregate:Definesthefieldtoreturnasinglevalueformultiplerowsofdata.

EditFieldOrderingPage

NewColumn:Entryfieldforassigninganewcolumndisplaypositionforthefield. Column:Thecurrentcolumndisplaypositionforthefield. Record.Fieldname:Therecordandfieldnameforthedata. OrderBy:Thecurrentsortorderforthefield. Descending:Indicatesifthedataissortedindescendingorascendingorder. NewOrderBy:Entryfieldforassigninganewsortorderforthefield.

SpearMCQueryManagerTrainingGuide

Page17

CriteriaPage
Aquerywithoutcriteriaretrieveseveryrowofdataintherecord.Criteriastatementsfilterthedatato narrowresults.Criteriastatementsfilterdatabycomparingfieldvalues,expressions,andlogicaloperators. AccesstheCriteriaPageto: DefineCriteria EditCriteria GroupCriteria ReorderCriteria DeleteCriteria

CriteriaPageInformation QueryNameandDescription:Thenameanddescriptionforanexistingquerydisplaysatthetopof thepage.Whencreatinganewquery,NewUnsavedQuerydisplaysfortheQueryName,anda Descriptionwillnotdisplay. AddCriteria:OpenstheEditCriteriaPropertiesPagetodefinecriteria. GroupCriteria:OpenstheEditCriteriaGroupingPagetoapplygroupinglogictothecriteriawhen multipleoperatorsofdifferenttypesareused. ReorderCriteria:OpenstheEditCriteriaOrderingPagetochangetheordercriteriaisappliedto thequery. Logical:Displaystheoperatorappliedtoconnectthecriteriastatements.Adropdownlistprovides availableoptions. Page18 SpearMCQueryManagerTrainingGuide

Expression1:Displaysthefieldorexpressiondefinedasthefilterdata. ConditionType:Displaysthecomparisonoperatordefinedforthefilter. Expression2:Displaysthefieldorexpressiondefinedasthecomparisondataforthefilter. Edit:OpenstheEditCriteriaPropertiesPagetodefinecriteria. Delete:Removesthecriteriafromthequery. EditCriteriaProperties

Expression1:Definesthedatatobefiltered.Ifthefilterisbasedonafield,thefieldcontainingthe datawillbedefined.Ifthefilterisbasedonanexpression,theexpressionwillbedefined. ConditionType:Definesthecomparisonlogicforthetwoexpressions.TheConditionType determinesthedefinitionofExpression2.IfExpression1isanEffectiveDate,specialcondition typesbecomeavailable. Expression2:Definesthecomparisondataorvalue.DatafromExpression1comparestothedata inExpression2.Thequeryretrievesdatameetingthecondition.

SpearMCQueryManagerTrainingGuide

Page19

EditCriteriaGroupingPage

Logical:Thelogicoperatorconnectingthecriteriastatements. GroupingField1:Theentryfieldforparenthesistogroupcriteriastatements. Expression1:Thelogicdefinedforthefilteringexpression. ConditionType:Thelogicdefinedfortheexpressionoperator. Expression2:Thelogicdefinedforthecomparisondata. GroupingField2:Theentryfieldforparenthesistogroupcriteriastatements.

Page20

SpearMCQueryManagerTrainingGuide

EditCriteriaOrderingPage

NewPosition:Theentryfieldforchangingtheorderthequeryappliesthecriteriastatement. Position:Thecurrentorderthequeryappliesthecriteriastatement. Expression1:Thelogicdefinedforthefilteringexpression. ConditionType:Thelogicdefinedforthecomparisonoperator. Expression2:Thelogicdefinedforthecomparisondata.

SpearMCQueryManagerTrainingGuide

Page21

HavingPage
AddexpressionresultstocriteriastatementsusingtheHavingPage.TheCriteriaPageonlyallowsfields containedwithinarecordtobeaddedtocriteriastatements.Forexample,creatingaquerytoprovidea listofjournalentries,wherethesumofthejournalentriesforadaterangeisgreaterthanzero,requires HavingCriteria.Anexpressiondefinesthesumofthejournalentries.Theresultofthejournalentry expressionisaddedtoacriteriastatementtoretrieveonlythoseamountshavingatotalamountgreater thanzero.Thequeryperformsthecalculationbeforeapplyingthecriteriastatement. AccesstheHavingPageto: AddExpressionResultstoCriteria EditHavingCriteria GroupHavingCriteria ReorderHavingCriteria DeleteHavingCriteria

HavingPageInformation QueryNameandDescription:Thenameanddescriptionforanexistingquerydisplaysatthetopof thepage.Whencreatinganewquery,NewUnsavedQuerydisplaysfortheQueryName,anda Descriptionwillnotdisplay. AddHavingCriteria:OpenstheEditHavingCriteriaPagetodefinecriteriausinganexpression result. GroupCriteria:OpenstheEditCriteriaGroupingPagetoapplygroupinglogictothecriteriawhen multipleoperatorsofdifferenttypesareused. ReorderCriteria:OpenstheEditCriteriaOrderingPagetochangetheorderthequeryapplies criteriastatements. Page22 SpearMCQueryManagerTrainingGuide

Logical:Displaystheoperatorconnectingthecriteriastatements. Expression1:Displaysthefieldorexpressiondefinedasthefilterdata. ConditionType:Displaysthecomparisonoperatordefinedforthefilter. Expression2:Displaysthefieldorexpressiondefinedasthecomparisondataforthefilter. Edit:OpenstheEditHavingCriteriaPropertiesPagetodefinecriteria. Delete:Removescriteriastatementsfromthequery. EditHavingCriteriaProperties

Expression1:Definesthedatatobefiltered.Ifthefilterisbasedonafield,thefieldcontainingthe datawillbedefined.Ifthefilterisbasedonanexpression,theexpressionwillbedefined. ConditionType:Definesthecomparisonlogicforthetwoexpressions.Theconditiontypeselected determineshowExpression2isdefined.IfExpression1isanEffectiveDate,specialconditiontypes becomeavailable. Expression2:Definesthecomparisondataorvalue.DatafromExpression1iscomparedtothe datainExpression2.Datameetingtheconditionwillberetrievedbythequery. SpearMCQueryManagerTrainingGuide Page23

EditCriteriaGroupingPage

Logical:Thelogicoperatorconnectingthecriteriastatements. GroupingField1:Theentryfieldforparenthesistogroupcriteriastatements. Expression1:Thelogicdefinedforthefilteringexpression. ConditionType:Thelogicdefinedfortheexpressionoperator. Expression2:Thelogicdefinedforthecomparisondata. GroupingField2:Theentryfieldforparenthesistogroupcriteriastatements.

Page24

SpearMCQueryManagerTrainingGuide

ViewSQLPage
TheViewSQLPagedisplaysthedefinitionofthequeryinStructuredQueryLanguage.QueryManager takesallfields,expressions,calculations,andcriteriaforthequeryandcompilesitintoSQL.ViewingSQL helpsidentifylogicanddataissueswithqueries.Inaddition,usetheSQLofaworkingquerywithother querytoolsthatmayoffermoreflexibilityindesigningqueries.

SpearMCQueryManagerTrainingGuide

Page25

PreviewPage
UsetheRunPagetoreviewqueryresultspriortosaving,printing,ordownloadingthequery.FromRun, navigatequeryresults,refreshdataafteraddingnewinformation,anddownloadtheresultstoExcel.

RunPageInformation PromptsUsed:Ifpromptswereusedtoexecutethequery,thenameofthepromptandthedata enteredbytheuserdisplaysabovethequeryresults. ViewAll:Selecttoviewallqueryresultswithoutpagination. RerunQuery:Selecttorefreshthequeryresults. DownloadtoExcel:SelecttoopenqueryresultsinExcel.

Page26

SpearMCQueryManagerTrainingGuide

QUERYMANAGERCOMMONACTIONS NavigatingResults
AfterperformingasearchinQueryManager,resultsconsistentlydisplaywithaheadertonavigatethrough theresults.

ViewAll:Displaysthesearchresultsononepage.Bydefault,QueryVieweronlydisplays30resultsata time.SelectViewAlltodisplayalltherecordsretrievedwithoutpagination.ThelinkrevertstoView30 aftertheresultsaredisplayed. PageNavigation:TheQueryheaderdisplaysthenumberofrecordsdisplayedandthenumberofrecords retrieved.QuicklynavigatetothefirstandlastresultspagesusingtheFirstandLastlink.Navigateone pageatatimeusingthearrowbuttons.

CustomizingQueryManager
EverysearchperformedinQueryManagerproducesaresultspagewithaheader.Customizeresults displaytosuittheneedsoftheindividualuser.ThecustomizationattachestotheUserIDanddatabase instance.Futuresearchresultsforthepagedisplayintheorderrequested.Customizingtheresultsdisplay foronepagedoesnotaffecttheresultsonanotherpage.

SpearMCQueryManagerTrainingGuide

Page27

CustomizeSearchResultsDisplay SelectCustomizefromtheNavigationHeader. SelectthecolumntitlefromtheColumnOrderlist. Usetheupanddownarrowbuttonstomovethecolumntitle. CustomizeSearchResultsSort SelectCustomizefromtheNavigationHeader. SelectthecolumntitlefromtheColumnOrderlist. UsetherightarrowbuttontocopythecolumntitletotheSortOrderlist. IfmultiplecolumntitlesareaddedtotheSortOrderlist,usetheupanddownarrowbuttonsto movethecolumntitle. RemoveColumnsfromSort SelectCustomizefromtheNavigationHeader. SelectthecolumntitlefromtheSortOrderlist. Selectthedeleteicontoremovethecolumntitle. SortinDescendingOrder SelectCustomizefromtheNavigationHeader. SelectthecolumntitlefromtheSortOrderlist. Selectthedeleteicontoremovethecolumntitle.

Page28

SpearMCQueryManagerTrainingGuide

QueryManagerCommands
ThefollowingcommandsdisplayatthebottomofQueryManagerPages.

Save/SaveAs:UseSaveorSaveAstocommitquerychanges.Saveoverwritestheexistingquery.SaveAs savesacopyofthequery.

Query:Namethequeryusingstandardnamingconventions. Description:Ashortdescriptionofthequeryspurpose. Folder:Thenameofthefolderwherethequerywassaved. SpearMCQueryManagerTrainingGuide Page29

QueryType:Definesthequerysintendeduse. o Archive:UsedbytheDataArchiveManagerprocess. o User:UsedtoretrievedatadirectlyfromthePeopleSoftdatabase. o Role:Usedtodeterminecontactsandcommunicationslinkswhenworkingwith PeopleSoftBusinessprocess. o Process:Runsperiodicallyasabatchprocess. Owner:SavequeriesaseitherPublicorPrivate.Publicqueriescanbeexecuted,opened,modified, ordeletedbyanyonewithpropersecurityaccess.Privatequeriescanonlybeexecuted,opened, modified,ordeletedbytheindividualwhocreatedthequery. QueryDefinition:Adescriptionandpurposeofthequery. NewQuery:OpenstheRecordsPagetostartbuildinganewquery. Preferences:Definesthedisplayofrecordandfielddescriptions,enablesautomaticrecordjoins,and enablesautopreview.PreferencesareUserIDspecific.Changesmadetopreferenceswillapplytoeach querycreatedbytheuser.

NameStyle:DefinesthedisplayofrecordandfieldnamesthroughoutQueryManagerPages. EnableAutoJoin:Determinesfieldscreatingarecordjoinwhenaddingmultiplerecordstoa query. EnableAutoPreview:CausesthequerytoautomaticallyrerunwhenaccessingthePreviewPage. Properties:Displaysthepropertiesforasavedquery.QueryPropertiesarespecifictothequerybeing created.Theinformationwillchangewitheachquerycreated

Page30

SpearMCQueryManagerTrainingGuide

Query:Thenameassignedtothequery. Description:Ashortdescriptionofthequeryspurpose. Folder:Thenameofthefolderusedtocategorizethequery. QueryType:Definesthequerysintendeduse. o Archive:UsedbytheDataArchiveManagerprocess. o User:UsedtoretrievedatadirectlyfromthePeopleSoftdatabase. o Role:Usedtodeterminecontactsandcommunicationslinkswhenworkingwith PeopleSoftBusinessprocess. o Process:Runsperiodicallyasabatchprocess. QueryDefinition:Adescriptionandpurposeofthequery. LastUpdatedDate/Time:Providesthequerycreationorlastmodificationdate. LastUpdateUserID:Providesidentificationofthepersonwhocreatedorlastmodifiedthequery. NewUnion/DeleteUnion:Usetojoinseparatequeries.TheRecordsPageisopenedforuserstobegin creatinganadditionalquery. ReturntoSearch:OpensthemainQueryManagerPage. SpearMCQueryManagerTrainingGuide Page31

INTENTIONALLYLEFTBLANK

Page32

SpearMCQueryManagerTrainingGuide

CHAPTER3WORKINGWITHEXISTINGQUERIES
UseQueryManagertoexecute,modify,rename,copy,anddeleteexistingqueries.Theactionsavailablein QueryManageraredependentuponUserSecurity.Notallthefunctionalitydescribedmaybeavailableto everyuserwithQueryManageraccess.

SEARCHINGFOREXISTINGQUERIES
QueryManagerprovidestwomethodsforfindingexistingqueries:BasicSearchandAdvancedSearch. BasicSearchprovidesageneralsearchusingtheBeginswithcomparisonoperator.AdvancedSearch offersmorecomparisoncriteriatomaketheresultsmorespecific.QueryManageropensinBasicSearch mode. SEARCHFORAQUERY SelectSearchMethod:AdvancedorBasic SelectSearchByOption IfusingAdvancedSearch,SelectConditionalOperator. EnterSearchData

SelectingaSearchMethod

BasicSearch:Assumesthatthecriteriaenteredwillbefoundatthebeginningofadatastring. AdvancedSearch:SelectAdvancedSearchtoopenthesearchpage.UsetheConditionalOperatorsinthe dropdownlisttodefinethesearch. UsingConditionalOperators:InAdvancedSearch,ConditionalOperatorscomparethesearch optionwiththevalueentered.

SpearMCQueryManagerTrainingGuide

Page33

< <= = > >= Beginswith Between Contains In

Resultsarelessthanthecriteriaentered. Resultsarelessthanorequaltothecriteriaentered. Resultsareexactlyequaltothecriteriaentered. Resultsaregreaterthanthecriteriaentered. Resultsaregreaterthanorequaltothecriteriaentered. Resultsbeginwiththecriteriaentered. Resultsfallwithinandincludetherangeentered.Separaterangewithcommas. Resultscontainsomeformofthecriteriaentered.Enteringbegwouldreturn Beginning,Beg.,etc. Resultspresentedhaveoneormoreofthecriteriaentered.Separatecriteriawith commas.EnteringLedgerandBankwouldproduceresultscontainingeitherledger orbank. Resultsdonotincludethecriteriaentered.EnteringLedgerwillpreventLedger fromreturning.

Not=

Page34

SpearMCQueryManagerTrainingGuide

DefiningSearchByOption
Whensearchingforanexistingquery,boththeBasicSearchandAdvancedSearchprovidethefollowing categoriestoguidethesearch.ThedefaultsearchcategoryisQueryName.

AccessGroupName:Providesalistofqueriesbasedonusersecurityaccesstothedatabaseinformation. EnterthebeginningoftheAccessGroupNameorusetheLookupTooltoviewalistofavailablegroups. Thesearchretrievesqueriesavailabletothesecuritygroupselected. WHATISTHELOOKUPTOOL? TheLookupTooldisplaysasamagnifyingglassnexttoorinplaceofsearchable fields.Usetoopentablescontainingpredefineddataforthefieldbeingsearched.For instance,whensearchingonaBusinessUnitfield,selecttheLookUpToolfor predefinedBusinessUnitcodes.

Description:Thecommonnameusedtodescribethequery.Enterthebeginningofthedescriptionoruse wildcardsforapartialname.Usingwildcardsbeforeandafterthesearchcriteriareturnsanyquerywith thecriteriainthedescription.Forinstance,%beg%willreturnqueriescontainingBeg,beg,and beginninginthedescription. FolderName:Thefolderwherethequeryisstored.Enterthebeginningofthefoldernameoruse wildcardstosearchforqueriesinspecificfolders. Owner:QueriesaresavedaseitherPublicorPrivate.Publicqueriescanbeexecuted,opened,modified,or deletedbyanyonewithpropersecurityaccess.Privatequeriescanonlybeexecuted,opened,modified,or deletedbytheindividualwhocreatedthequery.

SpearMCQueryManagerTrainingGuide

Page35

QueryName:Searchforaquerybasedonthenameassignedwhenitwassaved.Enterthebeginningof thequerynameorusewildcardsforpartialnames. Type:Searchforaquerybasedonitsfunction.TheoptionsforquerytypeareArchive,User,Role,and Process.EnduserswillgenerallyusetheUserquerytype. Archive:UsedbytheDataArchiveManagerprocess. User:UsedtoretrievedatadirectlyfromthePeopleSoftdatabase. Role:UsedtodeterminecontactsandcommunicationslinkswhenworkingwithPeopleSoft Businessprocess. Process:Runsperiodicallyasabatchprocess.Forinstance,aquerycouldbedevelopedtoruna monthlyreportofoutstandingbalancesonaccounts. UsesFieldName:Searchforqueriesusingaspecificfieldofdata.Aspecificfieldnameorthebeginningof thefieldnamecanbeentered.Tobemostspecific,entertheexactfieldname. UsesRecordName:Searchforqueriesusingaspecificrecord.Aspecificrecordnameorbeginningofthe namecanbeentered.Tobemostspecific,entertheexactrecordname.

EnteringSearchCriteria
Leavingthesearchfieldblankreturnsallqueries.UsewildcardstoexpandthesearchbeyondtheBegins withcondition. ANoteonWildcardswildcardsareplaceholdersfordatawhenconductingasearch. ThemostcommonlyusedwildcardinPeopleSoftisthe%symbol. %value:searchesfordatacontainingthewordvalueattheendofadatastring. %value%:searchesfordatacontainingthewordvaluewithinadatastring. value%:searchesfordatacontainingthewordvalueatthebeginningofadatastring.

ExploringQuerySearchResults
Queriesmeetingthecriteriareturninalist.Fromthequerysearchresults,queriescanbeexecutedor openedformodification.

Page36

SpearMCQueryManagerTrainingGuide

Select:UsetheSelectcheckboxtoperformthesameactiononmultiplequeries.CheckAllselects allqueriesdisplayedforthesameaction.UncheckAllremovestheselections. QueryName:Thenameofthequery.Clickthequerynametoopenthequeryformodification. Descr:Adescriptionofthequery. Owner:QueriesaresavedaseitherPublicorPrivate.Publicqueriescanbeexecuted,opened, modified,ordeletedbyanyonewithpropersecurityaccess.Privatequeriescanonlybeexecuted, opened,modified,ordeletedbytheindividualwhocreatedthequery. Folder:Thenameofthefolderstoringthequery.Thisdisplaysonlyifthequerywasassignedtoa folderwhenitwascreated.

SpearMCQueryManagerTrainingGuide

Page37

FilteringResults
FolderView:UseFolderViewtofilterresultsforqueriesstoredinaspecificfolder.Foldersare createdusingtheQueryManagerandqueriescanbeassignedtofolderswhentheyaresaved. Storingqueriesinfoldershelpsinorganizingqueriesbycategory,workprocess,ordepartment.

Page38

SpearMCQueryManagerTrainingGuide

MANAGINGQUERIES
QueryManagerallowsuserstoperformvariousorganizationalfunctionswithqueries.Queriescanbe assignedtoausersfavoritefolder,copiedtootherusers,deleted,organizedinfolders,andrenamed. AddfrequentlyusedqueriestoMyFavoriteQueries. Copyprivatequeriestootherusers Organizepublicandprivatequeriesinfolders. Deleteobsoletequeries. Renameexistingqueries.

ThemanagementtoolsareavailableonthemainQueryManagerPage.UsetheActiondropdownmenu andtheselectioncheckboxestoperformmanagementfunctionsonqueries.

SelectCheckboxes:UsetheSelectcheckboxtoperformanactiononspecificqueries.CheckAllselectsall queriesforthesameaction.UncheckAllremovestheselections.

MyFavoriteQueries
UsetheAddtoFavoritesactiontosaveafrequentlyusedquerytoafavoritefolder.Thequeryisaddedto MyFavoriteQuerieslistandisassociatedtoaUserIDanddatabase.ThelistisavailableeachtimeQuery Managerisaccessed.Thelistcanbeclearedorspecificentriesremoved.

SpearMCQueryManagerTrainingGuide

Page39

Ifaqueryisrunregularlyaspartofabusinessprocess,addittoMyFavoriteQueries. ADD TO MY FAVORITE QUERIES SearchforanexistingqueryonthemainQueryManagerPage. SelectthecheckboxesforthequeriestobeaddedtoMyFavoriteQueries. SelectAddtoFavoritesfromtheActiondropdownlist.

DeletingfromMyFavoriteQueries QueriesaredeletedfromMyFavoriteQueriesbyselectingtheRemoveiconforthequeryorbyselecting theClearFavoritesListbutton.RemovingaqueryfromMyFavoritesdoesnotdeleteitfromthedatabase.

Page40

SpearMCQueryManagerTrainingGuide

CopyingQueriestoOtherUsers
APrivatequerymaybecopiedtoanotheruser.Thisfunctionisonlyperformedonaquerythatisdefined asPrivatewhenitwascreatedormodified.Thisisusefulinsharingquerieswithinaworkunitwithout makingthequeriesPublic. Theuseryouarecopyingqueriestoshouldhaveaccesstoalltherecordinformationin thequery.Iftheuserdoesnothaveproperaccess,thecopiedquerieswillnotappearin theirlistofavailablePrivatequeries. COPY TO ANOTHER USER SelectthequeriestobecopiedfromthemainQueryManagerPage. SelectCopytoUserfromtheActiondropdownlist. SelectGo. EntertheUserIDoftheuserwhoneedsaccesstothequery.

SpearMCQueryManagerTrainingGuide

Page41

DeletingQueries
Obsoletequeriesmaybedeleted.Beforedeletingaquery,confirmthatthequeryisnolongerusedby anyoneusingthePeopleSoftdatabases.Queryusagecanbedeterminedbytechnicalstaff. IfaPrivatequeryhasbeencopiedtoanotheruser,deletingthequerywillnotdeletethe copiedinstance.IfdeletingaPrivatequerythatissharedwithinaworkunit,notifythe memberstoensurethatanobsoletequeryisnolongerbeingused. DELETE A QUERY SelectthequeriestobedeletedfromthemainQueryManagerPage. SelectDeleteSelectedfromtheActiondropdownlist. SelectGo. Selecttoconfirmthedeletionontheconfirmationpage.

Page42

SpearMCQueryManagerTrainingGuide

OrganizingwithFolders
Assigningqueriestofoldersmakesiteasierforuserstolocatequeriesassociatedtoabusinessprocess. Queriesmaybeassignedtoexistingfoldersortoanewfolder. MOVE TO AN EXISTING FOLDER SelectthequeriestobemovedfromthemainQueryManagerPage. SelectMovetoFolderfromtheActiondropdownlist. SelectGo. Selectafolderfromthedropdownlist. SelectOK. CREATE A NEW FOLDER SelectthequeriestobemovedfromthemainQueryManagerPage. SelectMovetoFolderfromtheActiondropdownlist. SelectGo. Enteranewfoldernameintheentryfield. SelectOK.

SpearMCQueryManagerTrainingGuide

Page43

REMOVE QUERY FROM A FOLDER SearchforthequeryonthemainQueryManagerPage. Selectthequerynametoopenthequerypages. SelectthePropertieslinkatthebottomofthepage. DeletethenamefromtheFolderfield

Page44

SpearMCQueryManagerTrainingGuide

SpearMCQueryManagerTrainingGuide

Page45

RenamingQueries
Anexistingquerymayberenamedtomakeitstitleanddescriptioneasiertoidentifyandunderstand.Use thestandardnamingconventionsdefinedbyyourorganizationwhenassigningaqueryname. WhenrenamingaPublicquery,notifyallusersofthequeryofthenamechangeto preventconfusion. RENAME A QUERY SelectthequeriestoberenamedfromthemainQueryManagerPage. SelectRenameSelectedfromtheActiondropdownlist. SelectGo. Enterthenewnamesforthequeries. SelectOK.

Page46

SpearMCQueryManagerTrainingGuide

CHAPTER4WORKINGWITHRECORDS
PeopleSoftdataisstoredintables.PeopleSoftappliesrecordaddressestotablesasidentifiers.When workingwithqueries,arecordreferstoarowofdatainatable.Afieldisasubsetoftherecord,andis representedasacolumnonthetable.Recordsprovideahighleveladdressforthedatalocations.Usethe RecordsPagetoaddrecordstoaquery. ADDRECORDSTOAQUERY SearchforaRecordontheRecordsPage. SelectShowFieldstoreviewfieldscontainedintherecord. SelectAddRecord/JoinRecord

SEARCHINGFORRECORDS
SearchforandaddrecordsusingtheRecordsPage.Recordsmeetingthesearchcriteriareturninalist. Fromtherecordsresults,recordscanbeaddedtothequeryandthefieldscontainedwithintherecordcan beviewed.

SelectingaSearchMethod

BasicSearch:Assumesthatthecriteriaenteredwillbefoundatthebeginningofadatastring. AdvancedSearch:SelectAdvancedSearchtoopenthesearchpage.UsetheConditionalOperators inthedropdownlisttodefinethesearch. UsingConditionalOperators:InAdvancedSearch,ConditionalOperatorscomparethesearch optionwiththevalueentered.

SpearMCQueryManagerTrainingGuide

Page47

< <= = > >= Beginswith Between Contains In Resultsarelessthanthecriteriaentered. Resultsarelessthanorequaltothecriteriaentered. Resultsareexactlyequaltothecriteriaentered. Resultsaregreaterthanthecriteriaentered. Resultsaregreaterthanorequaltothecriteriaentered. Resultsbeginwiththecriteriaentered. Resultsfallwithinandincludetherangeentered.Separaterangewithcommas. Resultscontainsomeformofthecriteriaentered.Enteringbegwouldreturn Beginning,Beg.,etc. Resultspresentedhaveoneormoreofthecriteriaentered.Separatecriteriawith commas.EnteringLedgerandBankwouldproduceresultscontainingeitherledger orbank. Resultsdonotincludethecriteriaentered.EnteringLedgerwillpreventLedger fromreturning.

Not=

Page48

SpearMCQueryManagerTrainingGuide

DefiningSearchByOption
Whensearchingforrecords,boththeBasicSearchandAdvancedSearchprovidethefollowingcategories toguidethesearch.ThedefaultsearchcategoryisRecordName.

AccessGroupName:Providesalistofrecordsbasedonusersecurityaccesstothedatabase information.Entertheexactgroupname,enterapartialnameusingwildcards,orusetheLookup Tooltoviewalistofavailablegroups.Thesearchretrievesrecordsavailabletothesecuritygroup selected. ContainsFieldName:Providesalistofrecordscontainingaspecificfield.Entertheexactfield name,orusewildcardstosearchforapartialname. Description:Providesalistofrecordsbasedonthecommonrecorddescription.Thecommon nameusedtodescribetherecord.Enterapartialnameusingwildcards. RecordName:Providesalistofrecordsbasedonthedatabaserecordname.Entertheexactrecord name,orusewildcardstosearchforapartialname.

EnteringSearchCriteria
Leavingthesearchfieldblankreturnsallrecordsinthedatabase.Usewildcardstoexpandthesearch beyondtheBeginswithcondition.

SpearMCQueryManagerTrainingGuide

Page49

ANoteonWildcardswildcardsareplaceholdersfordatawhen conductingasearch.ThemostcommonlyusedwildcardinPeopleSoftis the%symbol. %value:searchesfordatacontainingthewordvalueattheendofadata string. %value%:searchesfordatacontainingthewordvaluewithinadata string. value%:searchesfordatacontainingthewordvalueatthebeginningof adatastring.

ExploringRecordSearchResults
Recordsmeetingthecriteriareturninalist.Fromthequerysearchresults,recordscanbeopenedtoview fieldsandaddedtoqueries.

PREVIEWINGFIELDS
SelectShowFieldstodisplaythefieldscontainedintherecord.Reviewingthisinformationhelps determineiftherecordwillmeettheneedsofthequery.SelectReturntonavigatebacktorecordsearch results. KEYFIELDS Akeyfieldisauniqueidentifierofarecord.Arecordmayhavemultiplekeyfields.Ifa fieldisakeyfield,Ywilldisplayinthecolumnnexttothefieldname. Page50 SpearMCQueryManagerTrainingGuide

SpearMCQueryManagerTrainingGuide

Page51

ADDINGRECORDS
SelectthefirstrecordforaquerybyclickingAddRecord.AddRecordopenstheQueryPageallowingthe usertoselectthefieldsforthequery.Toaddadditionalrecordstothequery,navigatetotheRecordsPage tosearchandaddanewrecordusingJoinRecord.

DELETINGRECORDS
Deletingarecordfromaqueryalsodeletesallfieldscontainedintherecordandthecriteriadefinedfor thefields.RecordsaredeletedusingtheQueryPage.Selectthedeleteicontoremovearecordfroma query.

Page52

SpearMCQueryManagerTrainingGuide

CHAPTER5WORKINGWITHFIELDS
Afterarecordhasbeenselectedforaquery,QueryManageropenstheQueryPage. FieldsareaddedtoaquerythroughtheQueryPage.Specificinformationregarding ADDFIELDSTOAQUERY DisplayFieldsonQueryPage SelectCheckboxnexttofieldname

ADDINGFIELDS
ExpandtherecordsfolderontheQueryPagetoviewfields.Selectthefieldstobeusedinthequeryby clickingthecheckboxnexttothefieldname.Touseallfieldsintherecord,selectCheckAllFields.The fieldsselectedwillalsodisplayontheFieldsPage.

SpearMCQueryManagerTrainingGuide

Page53

CHANGINGCOLUMNDISPLAYORDER
QueryManagerappliesadefaultdisplayordertofieldsappearinginqueryresults.Whenaqueryisrun, theresultswilldisplaythefieldsofdataascolumns.Thequerywilldisplaythecolumnsintheorderlisted ontheFieldsPage.ChangethedisplayorderforcolumnsusingtheReorder/Sortbutton. Asystemassignedroworderingcolumnappearsasthefirstcolumninthequery previewresults.ThiscolumncannotberemovedorreorderedthroughQueryManager.

Page54

SpearMCQueryManagerTrainingGuide

UsingReorder/SortButton
UsetheReorder/Sortbuttontochangethedisplayorderforanindividualfield. CHANGECOLUMNDISPLAYORDER AccesstheEditFieldOrderingpageusingReorder/Sort AddanumberinNewColumntochangethedisplay

WhenthechangetotheColumnDisplayOrderiscomplete,thefieldslistedontheFieldsPagewillreorder accordingtothechangesmade.ThecolumndisplayorderforthefieldislistedundertheColheadingon theFieldsPage,andqueryresultsdisplayintheorderdefined.

SpearMCQueryManagerTrainingGuide

Page55

Page56

SpearMCQueryManagerTrainingGuide

DEFININGSORTORDER
QueryManagerdoesnotdefineasortorderforfieldsselectedforaquery.Whenaqueryisrun,the resultswilldisplayintheorderthedataisretrievedfromthedatabase.Changethedatasortorderusing Reorder/Sortbutton.

Multiplesortcriteriamaybedefined.Entering1definesthefieldastheprimarysort criteria,2definessecondarysort,etc. Toremoveafieldfromthesortcriteria,changetheOrderByNumberto0.

SpearMCQueryManagerTrainingGuide

Page57

UsingEditFieldOrderingPage
UsetheEditFieldOrderingPagetodefinethesortorderforallfieldsinthequery. CHANGESORTORDERFROMFIELDORDERINGPAGE AccesstheEditFieldOrderingPageusingReorder/Sort. EnterthesortnumberinNewOrderBytochangethedisplayorderinquery results. Tosortthefielddataindescendingorder,selectDescending.

Page58

SpearMCQueryManagerTrainingGuide

WhenthechangetotheColumnDisplayOrderiscomplete,thefieldslistedontheFieldsPagewillreorder accordingtothechangesmade.ThesortorderforthedataislistedundertheOrdheading.Ifthedatais sortedindescendingorder,Dwillappearwiththeorderingnumber.

SpearMCQueryManagerTrainingGuide

Page59

CHANGINGCOLUMNHEADINGS
QueryManagerappliescolumnheadingstoqueryresultsusingtheRFTShortNamedefinedforthefieldat therecordlevel.ChangethecolumnheadinginthequeryresultsusingtheEditFieldPropertiesPage. ChangingcolumnheadingstoRFTShortNameorRFTLongNamedonotdisplay immediatelyontheEditFieldPropertiesPages.NavigatebacktotheFieldsPagetoview howthecolumnheadingwilldisplay.

Columnheadingscanbeformattedbyselectingoneofthefollowingoptions: NoHeading:Aheadingwillnotdisplayforthecolumninthequeryresults. RFTShort:Theshortdescriptionforthecolumnasdefinedforthefield. RFTLong:Thelongdescriptionforthecolumnasdefinedforthefield. Text:Auserdefinedheadingwilldisplayforthecolumn.Ifselected,theuserdefinedheadingis enteredinHeadingText. CHANGE COLUMN HEADING AccesstheEditFieldPropertiesPageusingEdit. Selecttheheadingformat. IfTextisselected,enterthenameofthecolumninHeadingText

Page60 SpearMCQueryManagerTrainingGuide

SpearMCQueryManagerTrainingGuide

Page61

APPLYINGAGGREGATEFUNCTIONS
DefininganAggregateFunctionforafieldreturnsasinglecalculatedvalueforafield ratherthanreturningindividualrowsofdataforthefield.UseAggregateFunctionswhen providingsummarydata.AggregateFunctionsareappliedtoindividualfieldsusingthe EditFieldPropertiesPage. ThefollowingAggregateFunctionsareappliedtoindividualfieldsofdatausingtheEdit FieldPropertiesPage: None:Selectifanaggregatevalueisnotneeded. Sum:Providesthetotalforthefieldfromallrowsretrievedbythequery. Count:Providesthenumberofrowsretrievedbythequery. Min:Providesthelowestvalueofallrowsretrievedbythequery. Max:Providesthehighestvalueofallrowsretrievedbythequery. Average:Providesthesumofvaluesdividedbythenumberofrowsretrievedbythequery.

DEFINE AGGREGATE FUNCTION AccesstheEditFieldPropertiesPageusingEdit. SelecttheAggregateFunctiontobeapplied.

Page62

SpearMCQueryManagerTrainingGuide

QueryresultsusingSUMfunctionforPostedTotalAmountprovidesatotalamountforeachaccount.

QueryresultsusingCOUNTfunctionforAccountsprovidesthenumberofaccountsforeachBusinessUnit andLedger.TheSumfortheTotalAmountPostedadjuststoprovideatotalforalltheaccounts.

SpearMCQueryManagerTrainingGuide

Page63

QueryresultsusingMINfunctionforTotalAmountPostedprovidestheminimumtotalamountpostedfor eachaccount.

QueryresultsusingMAXfunctionforTotalAmountPostedprovidesthemaximumtotalamountposted foreachaccount.

Page64

SpearMCQueryManagerTrainingGuide

QueryresultsusingAVERAGEfunctionforTotalAmountPostedprovidestheaveragetotalamountposted toeachaccount.

SpearMCQueryManagerTrainingGuide

Page65

DELETINGFIELDS
DeletefieldsfromaqueryusingtheFieldsPage.Selectthedeleteiconforthefieldtoberemoved. DeletingafielddoesnotremoveitfromanyExpressions,Prompts,Criteria,orHavingCriteriadefinedfor thequery.

Page66

SpearMCQueryManagerTrainingGuide

CHAPTER6WORKINGWITHCRITERIA
Runningaquerywithoutcriteriareturnsallthedatacontainedinthefieldsselected.Addingcriteria refinesthequerybyaddinginstructionstothequerytofilterthedata.Usecriteriatocomparevaluesof twoseparatefields,ortocomparethedatainafieldtoaconstantvalue.Dataisfilteredbycomparingthe datainoneexpressionwithdatainasecondexpression.

DEFININGCRITERIA
AddoreditcriteriausingtheCriteriaPage,orbyselectingthecriteriaiconfromtheFieldsPageorQuery Page.Criteriadefinitionscomparetwodifferentexpressions.Expression1isdefinedthencomparedtothe definitionofExpression2.Expression1isthedatathatisbeingfiltered;Expression2providesthe comparisondata. DEFINECRITERIA Definethedataorexpressiontobefiltered:Expression1. SelecttheConditionType Definethecomparisondata:Expression2

SpearMCQueryManagerTrainingGuide

Page67

DefiningExpression1:FilterData
Field:Ifthedatabeingfilterediscontainedinarecord,usetheFieldoptiontodefineExpression1. UsetheLookupTooltosearchforafieldusedinthequery. Expression:Ifthedatabeingfilteredisbasedonanexpression,selecttheExpressionoption. FindinganExistingExpression:UsetheLookupTooltosearchforpreviouslydefinedexpressions withinthequery.TheremaybeinstanceswhenanexpressioncreatedintheExpressionsPageis alsoapartofthequeryfilter.Forinstance,aqueryisneededtocomparethesumsofamounts fromdifferentrecords.Theexpressionforthesumsoftheindividualamountswouldbedefinedon theExpressionsPage.TheresultsoftheexpressionsareneededontheCriteriaPagetobuildthe filter. EditExpression:UsetheLookupTooltosearchforanexistingexpression.UseEditExpressionto openandeditapreviouslydefinedexpression. NewExpression:SelectNewExpressiontoopentheExpressionsPageanddefineanewexpression

Page68

SpearMCQueryManagerTrainingGuide

DefiningConditionType
TheConditionTypeisthecomparisonoperatorbetweenthetwoexpressions.TheConditionTypeselected determinesthetypeofexpressioncreatedinExpression2. Between:ThevalueofExpression1fallsbetweenandincludesthetwovaluesdefinedin Expression2. NotBetween:ThevalueofExpression1doesnotfallbetweenanddoesnotincludethetwovalues definedinExpression2. ThevaluesofExpression2fortheBetweenconditionsarepresentedinoneofthefollowingcombinations: ConstConst:Definestwoconstantvalues. ConstField:Definesthefirstvalueasaconstantandthesecondafieldvalue. ConstExpr:Definesthefirstvalueasaconstantandthesecondvalueasanexpression. FieldConst:Definesthefirstvalueasafieldandthesecondvalueasaconstant. FieldField:Definesbothvaluesasfields. FieldExpr:Definesthefirstvalueasafieldandthesecondvalueasanexpression. ExprConstant:Definesthefirstvalueasanexpressionandthesecondvalueasaconstant. ExprField:Definesthefirstvalueasanexpressionandthesecondvalueasafield. ExprExpr:Definesthebothvaluesasexpressions. EqualTo:ThevalueofExpression1isexactlythevalueofExpression2. NotEqualTo:ThevalueofExpression1doesnotexactlymatchthevalueofExpression2. Exists:ThevalueofExpression1iscontainedinasubquery.Allrecordsmatchingareretrieved. DoesNotExist:ThevalueofExpression1isnotcontainedinasubquery.Allrecordsnotcontainedinthe subqueryareretrieved.

GreaterThan:ThevalueofExpression1isgreaterthanthevalueofExpression2. SpearMCQueryManagerTrainingGuide Page69

NotGreaterThan:ThevalueofExpression1isnotgreaterthanthevalueofExpression2. InList:ThevalueofExpression1isinalistofvaluesdefinedinExpression2. NotInList:ThevalueofExpression1isnotinalistofvaluesdefinedinExpression2.

InTree:ThevalueofExpression1isanodeinatreecreatedwithTreeManager.Expression2isatreeor branchofatree.Donotusetreescontainingacombinationofdynamicdetailsandrangedetails.The resultsreturnedfromtreeswiththiscombinationofdetailsmaybeinaccurate. NotInTree:ThevalueofExpression1isanodeinatreecreatedwithTreeManager.Expression2isnota treeorbranchofatree.Donotusetreescontainingacombinationofdynamicdetailsandrangedetails. Theresultsreturnedfromtreeswiththiscombinationofdetailsmaybeinaccurate.

Page70

SpearMCQueryManagerTrainingGuide

IsNull:ThefieldselectedforExpression1doesnothaveavalue.Nullisdifferentfrom0inthat0is consideredavalue.Ifthisconditiontypeisselected,Expression2willnotbedefined.Keyfields,required fields,characterfields,andnumericfieldsdonotallownullvalues. IsNotNull:ThefieldselectedforExpression1hasavalue.Nullisdifferentfrom0inthat0isconsidereda value.Ifthisconditiontypeisselected,Expression2willnotbedefined.

SpearMCQueryManagerTrainingGuide

Page71

LessThan:ThevalueofExpression1islessthanthevalueofExpression2. NotLessThan:ThevalueofExpression1isnotlessthanthevalueofExpression2. Like:ThevalueofExpression1matchesastringpatterndefinedinExpression2.Expression2mustcontain astringofdatacontainingwildcardcharacters. NotLike:ThevalueofExpression1matchesastringpatterndefinedinExpression2.Expression2must containastringofdatacontainingwildcardcharacters.

PeopleSoftrecognizes%and_aswildcardoperatorswhenworkingwithLIKE comparisons. %matchesanystringofzeroormorecharacters.Forexample,C%matchesany characterstringstartingwithC. _matchesanysinglecharacter.Forexample,_onesmatchesanyfivecharacterstring endingwithones,suchasJonesorCones.

Page72

SpearMCQueryManagerTrainingGuide

DefiningExpression2:ComparisonData
ExpressionTypesforExpression2areactivedependingontheConditionOperatorselected. Field:Ifthecomparisondataiscontainedinarecord,usetheFieldoptiontodefineExpression2.Usethe LookupTooltosearchforafieldusedinthequery. Expression:Ifthedatabeingcomparedisbasedonanexpression,selecttheExpressionoptionandbuild theexpressionusingSQL. AddPrompt:SelectAddPromptiftheexpressionwillbecalculatedbasedondataenteredbythe user. AddField:Selecttoaddafieldtotheexpression. Constant:ComparesExpression1toaconstantvalue. Subquery:ComparesExpression1todatareturnedinasubquery. Prompt:ComparesExpression1touserentereddatainaprompt. InList:ComparesExpression1toalistofvalues.ThisoptionisonlyavailablewhentheCondition OperatorsInListorNotInListisselected. CurrentDate:ComparesthedatevalueinExpression1tothecurrentsystemdate. TreeOption:ComparesExpression1toselectedtreenodes.Thisoptionisonlyavailablewhenthe ConditionOperatesInTreeorNotInTreeisselected. EffectiveSequence:Usedonsomeeffectivedatedrecords.

SpearMCQueryManagerTrainingGuide

Page73

WorkingwithEffectiveDates
EffectiveDatesareusedtoprovideahistoryofPeopleSoftdata.Whenanewrecordisaddedoranexisting recordisupdated,anewEffectiveDateisassignedtotherecord. Forqueries,theEffectiveDatecriteriaareautomaticallydefinedifarecordcontainstheEffectiveDateasa keyfield.Thedefaultcriteriaretrievesthemostrecentorcurrentrecord.

EffectiveDateConditionTypes DefiningEffectiveDatecriteriarequirestheuseofspecificcomparisonoperators.WhenanEffectiveDate isdefinedinExpression1,thefollowingConditionsTypesareavailable: EffDate<:RetrievesrecordswheretheEffectiveDateislessthanthevalueenteredinExpression 2. EffDate<=:RetrievesrecordswheretheEffectiveDateislessthanorequaltothevalueenteredin Expression2. EffDate>:RetrievesrecordswheretheEffectiveDateisgreaterthanthevalueenteredin Expression2. EffDate>=:RetrievesrecordswheretheEffectiveDateisgreaterthanorequaltothevalue enteredinExpression2. FirstEffectiveDate:Retrievesthefirstinstanceoftherecordentered. LastEffectiveDate:Retrievesthelastinstanceoftherecordentered.

Page74

SpearMCQueryManagerTrainingGuide

EffectiveDateComparisonData TheEffectiveDatecanbecomparedtoafield,expressionresult,constantvalue,orthecurrentdate. DefineExpression2usingoneofthefollowingoptions: Field:ComparesadatefieldfromarecordwiththeEffectiveDateinExpression1.Usethisoption toretrieverecordsthatwereeffectiveonthesamedateasanotherrecord. Expression:ComparestheresultsofanexpressionwiththeEffectiveDateinExpression1. Constant:ComparestheEffectiveDateinExpression1againstthedateenteredinExpression2. Usethisoptiontoretrievedataasofacertaindate. CurrentDate:ComparestheEffectivedateinExpression1againstthecurrentsystemdate.

WORKINGWITHMULTIPLECRITERIA
Ascriteriaareaddedtothequery,QueryManagercompilesthecriteriarelationshipsusingstandard LogicalOperators.UsetheCriteriaPagetodisplayandeditthelogicofcriteriarelationships.

SpearMCQueryManagerTrainingGuide

Page75

JoiningMultipleCriteriaStatements
Criteriastatementsarecreatedindividuallyforafieldandjoinedtocreatetheoveralllogicforthe query.Ascriteriaarecreated,QueryManagerjoinsthestatementsusingtheANDlogicoperator. LogicalOperatorsbetweencriteriastatementsaredisplayedandupdatedontheCriteriaPage.The firstcriteriastatementwillnotdisplayanoperator. AND:Retrievesrecordswhereallcriteriaconditionsaremet. ANDNOT:Retrievesrecordsmeetingtheconditionofthepreviouscriteriabutomitsrecords meetingthenextcondition. OR:Retrievesrecordswhereanyoftheconditionsaremet. ORNOT:Retrievesanyrecordsmeetingtheconditionsofthepreviouscriteriaandanyrecords thatdonotmeetthenextconditions. BuildNOTstatementsintothecriteriastatementsratherthanusingaNOToperator tojoinmultiplecriteria.WhenNOTisusedtojoincriteriastatements,Query ManagercannotuseSQLdatabaseindexestospeedupthesearch.

Inthecriteriastatementsabove,thedatawillbeevaluatedandretrievedinthefollowingmanner: 1. Recordswillbesearchedforaneffectivedatelessthanorequaltotodaysdatetopullthe mostrecentlyupdatedrecord;and 2. DepartmentswithadescriptionbeginningwithCwillberetrieved;and 3. DepartmentswithadescriptionbeginningwithDwillberetrieved.

Page76

SpearMCQueryManagerTrainingGuide

Theresultsforthequeryasitispresentedwillnotretrieveanydatabecausetherearenotany departmentsintherecordwithadescriptionbeginningwithCANDD.Toupdatethestatementsto retrievedepartmentsbeginningwithCorD,changethelogicaloperatorbetweenthelasttwo statementsbyselectingORfromthedropdownlist.Thiswillretrievedescriptionsstartingwitha'C' forthemostcurrenteffectivedatedrow,andalldescriptionsstartingwitha'D',foralleffectivedated rows.

SpearMCQueryManagerTrainingGuide

Page77

ReorderingCriteria
QueryManagercompilesthecriteriarelationshipsandevaluatesstatementsintheordertheyare defined.Whenusingmultiplecriteria,thestatementsmayneedtobereorderedinordertoapply groupingtothestatements.

REORDERCRITERIA AccesstheEditCriteriaOrderPageusingReorderCriteriaontheCriteriaPage. EntertheorderofevaluationinNewPosition.

Page78

SpearMCQueryManagerTrainingGuide

Inthecriteriastatementsabove,thedatawillbeevaluatedandretrievedinthefollowingmanner: 1. Recordswillbesearchedforaneffectivedatelessthanorequaltotodaysdatetopullthemost recentlyupdatedrecord;and 2. Departmentswithaneffectivestatusofinactivewillberetrieved;and 3. DepartmentswithadescriptionbeginningwithCwillberetrieved;or 4. DepartmentswithadescriptionbeginningwithDwillberetrieved. TheresultsforthequeryasitispresentedwillincludedepartmentsbeginningwithCandastatusof inactiveasoftodaysdate,andalldepartmentsbeginningwithD.Theinactivestatusstatementwill notapplytothedepartmentsbeginningwithDbecausethestatementsarenotorderedandgrouped properly.Beforethecriteriastatementscanbegrouped,theymayneedtobereordered.

SpearMCQueryManagerTrainingGuide

Page79

GroupingCriteria
QueryManagerappliesthecriteriastatementsbasedontherulesoflogicfortheorderofoperations. Parenthesesgroupthecriteriastatementstobeevaluatedfirst.ANDstatementsareevaluatedbefore ORstatements.Whenusingmultipletypesoflogicoperatorsinaquery,applygroupingtoensurethe statementsareevaluatedinthecorrectorder.

GROUPCRITERIA AccesstheEditCriteriaGroupingPageusingGroupCriteriaontheCriteria Page. Enterbeginningparenthesisintheleftentryfieldnexttothefirststatementto begrouped. Enterendingparenthesisintherightentryfieldnexttothelaststatementtobe grouped.

Page80

SpearMCQueryManagerTrainingGuide

Inthecriteriastatementsabove,thedatawillbeevaluatedandretrievedinthefollowingmanner: 1. DepartmentswithadescriptionbeginningwithCorDwillberetrieved;and 2. Recordswillbesearchedforaneffectivedatelessthanorequaltotodaysdatetopullthem mostrecentlyupdatedrecord;and 3. Departmentswithaneffectivestatusofinactivewillberetrieved. TheresultsforthequeryasitispresentedwillincludedepartmentsbeginningwithCorDwithan inactivestatusasoftodaysdate.

SpearMCQueryManagerTrainingGuide

Page81

DEFININGDISTINCTCRITERIA
Queriesretrieveallrecordsmeetingthecriteriadefined.Insomeinstances,asinglerecordwilldisplay multipletimesbecauseitmeetstheconditionsofmultiplecriteriastatements.Topreventthe duplicationofthesamerecordsinqueryresults,definethequerytoretrieveonlydistinctdata.Define distinctdatausingtheQueryPropertiesPage.

Page82

SpearMCQueryManagerTrainingGuide

EDITINGCRITERIA
AccesstheCriteriaPagetoeditexistingcriteriastatements.SelectEditforthecriteriastatementto opentheEditCriteriaPropertiesPage.

SpearMCQueryManagerTrainingGuide

Page83

DELETINGCRITERIA
AccesstheCriteriaPagetodeleteexistingcriteriastatements.Selectthedeleteiconforthecriteria statementtoremoveitfromthequerylogic.Deletingacriteriastatementdoesnotdeleteanyfieldsor expressionsdefinedforthequery.

Page84

SpearMCQueryManagerTrainingGuide

CHAPTER7BUILDINGPROMPTS

Promptsarefieldspresentedtotheuserwhenaqueryisrun.Promptsallowtheusertodefinethe parametersofthedataneededratherthanhavingtheparametersdefinedaspartofthecriteria definition.Usingpromptsallowsforthedevelopmentofgenericqueriestobeusedbymultiple workgroupsratherthandevelopingthesamequeryforallworkgroupswithspecificcriteria.

CREATINGPROMPTS
PromptsarecreatedandeditedbyaccessingtheEditPromptPropertiesPage.TheEditPrompt PropertiesPageopenswhenAddPromptorEditisselectedonthePromptsPage.Eachpromptcreated appearswhenAddPromptorEditisselectedonthePromptsPage.Eachpromptcreatedappearsonthe PromptspageandisidentifiedbyasystemassignedPromptIDandthedefinedpromptlabel.

CreateaPrompt
Definethefieldthatwillbefilteredbytheprompt. Definethetextlabelfortheprompt Definetheprompttabletobeused. Addtheprompttoacriteriastatement.

SpearMCQueryManagerTrainingGuide

Page85

SelectingFields
SelectthefieldnameforthedatatobefilteredbythepromptusingtheLookupToolforFieldName.The remaininginformationontheformpopulatebasedonthedatabasedefinitionforthefieldselected.

DefiningPromptLabel
ThedefaultpromptlabeldisplaysinHeadingType.Theheadingtypecanbechanged byselectingoneofthefollowingoptionsfromthedropdownlist. RFTShort:Theshortdescriptionforthefield. RFTLong:Thelongdescriptionthefield. Text: A userdefined label will display for the prompt. If selected, the userdefined label is enteredinHeadingText.

DefiningthePromptTable
AprompttableallowstheuseofaLookupToolwhenenteringthevaluesintheprompts.Thisoffersa levelofvalidationtoinsuretheuserisenteringthecorrectdataintheprompt.Afieldusingaprompt tablefordataentryshouldalsouseaprompttableforquery.Ifthefieldbeingfilteredusesaprompt tableatthedatabaselevel,thetypeoftableusedwillautopopulateinEditType. No Table Edit: The value entered in the prompt will not be verified for validity. The query will searchfordataasitisenteredintheprompt. Prompt Table: The value entered in the prompt is selected from an existing record. This would include items such as Project ID, Department ID, etc. A Lookup Tool appears with the prompt to assistusersinselectingvalidvalues. Translate Table: The value entered in the prompt is selected from a predefined table set. This would include items such as ethnicity, sex, state abbreviations, etc. A Lookup Tool appears with theprompttoassistusersinselectingvalidvalues. Yes/NoTable:Thevalueenteredinthepromptiscompletedbyselectingyesornofromalistof values. TheprompttableselectedwilldependupontheEditTypeforthefield.IfanEditTypepopulates,usethe LookupTooltofindtheappropriateprompttabletouse.Whentheuseraccessesthepromptwhen runningthequery,theLookupToolprovidedwillopentheselectedtable.

Page86

SpearMCQueryManagerTrainingGuide

ADDINGPROMPTSTOCRITERIA
Inordertousepromptsinrunningthereport,thepromptneedstobeaddedtothereportcriteria. Aftercreatingaprompt,accesstheCriteriaPagetoaddtheprompttothequery.Createacriteria statementforapromptbyaccessingtheCriteriaPage.SelectAddCriteria,tobuildacriteriastatement usingaprompt.

ForExpression1,selectthefieldthatwillbeusedtocomparewiththeprompt.Intheexamplebelow,a promptwasbuilttoallowtheusertosearchbyaspecificProjectID. ForExpression2,selecttheExpressionTypeofPrompt.IntheExpression2field,usethelookuptoolto findthepromptbuiltforProjectID.SelectOKtosavethecriteriastatement.Note:youmayneedtoadd anewpromptifonedoesnotexist.ForProjectID,youcanusethefollowingtabletogetalistofvalid valuesforprompting:PROJECT_ID_VW.

SpearMCQueryManagerTrainingGuide

Page87

ThepromptcriteriastatementnowappearsontheCriteriaPage.Ifacriteriastatementdoesnotappear foraprompt,thepromptwillnotdisplaywhentheuseraccessesthequery.

DELETINGPROMPTS
AccessthePromptsPagetodeleteexistingprompts.Selectthedeleteiconfortheprompttoremoveit fromthequery.Deletingapromptdoesnotdeleteanyfields,expressions,orcriteriadefinedforthe query.

Page88

SpearMCQueryManagerTrainingGuide

CHAPTER8BUILDINGEXPRESSIONS
Expressionsarecalculationsusedtoprovideavaluethatisnotafieldinthedatabaseorformattingof querydatausingStructuredQueryLanguage(SQL).Calculationsaredefinedusingvaluesfromdifferent fieldsorbyconstantvalues.Thefinalformattedorcalculatedfieldistreatedlikeanyotherfieldina query.UsetheExpressionsPagetodefinecalculationsthatwillbeusedasadditionalfieldsinthequery.

DEFININGEXPRESSIONS
ThelogicbehindexpressionsisdefinedbyaccessingEditExpressionPropertiesPage.TheEditExpression PropertiesPageopenswhenAddExpressionorEditisselectedontheExpressionsPage.

CreateanExpression
SelectExpressionType EnterMaximumLengthofExpressionResult SelectAggregateFunction,ifdefiningacalculation. EntertheSQLstatementintheExpressionTextField. SelectAddFieldorAddPrompttoselectthefieldfortheexpression.

SpearMCQueryManagerTrainingGuide

Page89

FORMATFOREXPRESSIONTEXTFUNC(Fieldname) FUNCistheactionthatwillbetakenonthefield. Fieldnameisthenameofthefieldfromthequerythatwillbeaffectedbythefunction. SeparateFUNCandFieldnamewithparenthesis.

SelectingExpressionType
QueryManagerallowsforexpressionstobecreatedusingcharacter,numbers,date,andaggregate functions.DeterminethedataformatfortheexpressionandselecttheappropriateExpressionTypefrom thedropdownlist. ExpressionTypecorrespondswiththedataformatofthefieldsusedintheexpressionandtheendresult oftheexpression.FieldformatandlengthdefinitionsdisplayontheFieldsPage.

Page90

SpearMCQueryManagerTrainingGuide

BuildingCharacterExpressions
SelecteitherCharacterorLongCharacterwhenbuildingexpressionsusingfieldswithacharacterformat. Generally,characterexpressionsarecreatedtoformatdataretrievedbythequery. BUILDACHARACTEREXPRESSION SelecteitherCharacterorLongCharacterfromtheExpression Typedropdownlist. EnterthemaximumlengthoftheexpressionresultinLength. EntertheSQLstatementforthecharacterexpressionin ExpressionText. SelectAddFieldtoapplytheexpressiontoaspecificfieldinthequery.

Createacharacterexpressiontoformatdataconsistently,combinetwofieldstodisplay asone,adddollarsignsandcommastonumbers,andchangedateformats.

QueryPriortoAddingExpression:DepartmentIDandDescriptionaredisplayedastwoseparate columns.ThecaseforDescriptionisinconsistent.

SpearMCQueryManagerTrainingGuide

Page91

ExpressionDefinition:Characterlengthisdefinedfor45characters.ThelengthoftheDepartmentID fieldisformattedfor10charactersandcharacterlengthoftheDescriptionfieldisformattedfor30 characters.Additionallengthwasaddedaspaddingforspacing.Theresultoftheexpressionstatement shouldbelessthan45characters.Iftheexpressionresultisgreaterthanthedefinedlength,thedatawill truncate.TheSQLstatementforchangingcaseandconcatenatingthefieldshasbeenaddedtothe ExpressionTextfield.Note:theexpressionmayvarybasedonthedatabasebeingaccessed.

Page92

SpearMCQueryManagerTrainingGuide

QueryAfterApplyingExpression:DepartmentIDandDescriptionisdisplayedasonecolumninthequery results.DepartmentDescriptiondisplaysinuppercase.

BuildingNumberExpressions
SelecteitherNumberorSignedNumberwhenbuildingexpressionsusingfieldswithanumberformat. Createnumberexpressionstocalculateresultsbetweentwonumberfieldsortoapplyformattingto numericdata. BUILDANUMBEREXPRESSION SelecteitherNumberorSignedNumberfromtheExpressionTypedropdownlist. EnterthemaximumlengthoftheexpressionresultinLength. EnterthenumberofdigitstoappearafterthedecimalpointinDecimal. Ifbuildingacalculation,selectAggregateFunction. EntertheSQLstatementforthenumericexpressioninExpressionText. SelectAddFieldtoapplytheexpressiontoaspecificfieldinthequery. Createanumberexpressiontocalculatenumericfieldsandformatdecimal placement.

SpearMCQueryManagerTrainingGuide

Page93

QueryResultsPriortoAddingExpression:TotalAmountisdisplayedwiththreedigitsbehindthedecimal place,andtheamountisexact.

ExpressionDefinition:Characterlengthisdefinedfor12charactersanddecimalplacementissetto2.If theresultoftheexpressionisgreaterthan12digits,thedatawilltruncate.TheSQLstatementfor roundingthenumberisdefinedinExpressionText.

Page94

SpearMCQueryManagerTrainingGuide

QueryResultsAfterApplyingExpression:TheTotalAmountisdisplayedwithtwodigitsbehindthe decimalandroundedtothenextwholedollar.

SpearMCQueryManagerTrainingGuide

Page95

BuildingDateExpressions
SelectDate,Datetime,orTimetobuildexpressionsusingfieldswithadateformat.ForPeopleSoft,dates arepredefinedatthedatabaseleveltodisplaytotheuserintheDD/MM/YYYYformat.Foreveryquery containingadate,thedateisautomaticallyconvertedtoacharacterformat.Properfunctioningofdate expressionsislimited. BUILDADATEEXPRESSION SelectDate,Datetime,orTimefromtheExpressionTypedropdownlist. EnterthemaximumlengthoftheexpressionresultinLength. EntertheSQLstatementforthedateexpressioninExpressionText. SelectAddFieldtoapplytheexpressiontoaspecificfieldinthequery.

CreateadateexpressiontodisplaythecurrentdateinaquerybyenteringSYSDATE intheExpressionText.Note:thisfunctionmayvarybydatabase.

Page96

SpearMCQueryManagerTrainingGuide

DEFININGAGGREGATEFUNCTIONS
TheExpressionsPageallowstheuseofAggregateFunctionsinperformingcalculations.Anaggregate functionreturnsasummaryoftheresultsofthequeryratherthaneachindividualrow. BUILDANAGGREGATEFUNCTION SelecttheExpressionTypebasedontheformatofthefieldsbeingused. EnterthemaximumlengthoftheexpressionresultinLength. SelecttheAggregateFunctionscheckbox. EntertheappropriatefunctionstatementintheTextBox. SelectAddFieldtoaddfieldstothefunctionstatement.

SUM:Providesatotalfortheselectedfield.TheSumfunctionisusedfor numericfields.

SpearMCQueryManagerTrainingGuide

Page97

AVG:Providestheaverageoftheselectedfield.TheAvgfunctionisusedfornumericfields.

COUNT:Usetoprovideacountofallrowssatisfyingthecriteria.

Page98

SpearMCQueryManagerTrainingGuide

MAX:Providesthelargestfigureintheselectedfield.

SpearMCQueryManagerTrainingGuide

Page99

MIN:Providesthesmallestfigureintheselectedfield.

AddField WhencreatinganExpression,selecttheAddFieldcommandtoselectthefieldorfieldsusedinthe expression.IfusinganSQLcommandoranAggregateFunction,addparenthesisaroundthefieldname. AddPrompt Expressioncanbebuiltusingprompts.Thepromptexpressioncomparesthedataenteredbytheuser.

Page100

SpearMCQueryManagerTrainingGuide

ADDINGEXPRESSIONSTOCRITERIA
Theresultsofanexpressioncanbeusedtodefinecriteriastatements.Criteriastatementsusing expressionsaredefinedontheHavingCriteriaPage.HavingCriteriacausestheexpressionstatementto beevaluatedpriortoapplyingthecriteriastatementtothequery.

DELETINGEXPRESSIONS
RemoveanexpressionfromaqueryusingthedeleteiconontheExpressionsPage.Deletingan Expressiondoesnotdeletearecordorfieldfromaquery.However,iftheexpressionisusedaspartofa criteriastatement,thecriteriastatementwillbedeleted.

SpearMCQueryManagerTrainingGuide

Page101

INTENTIONALLYLEFTBLANK

Page102

SpearMCQueryManagerTrainingGuide

CHAPTER9BUILDINGSUBQUERIES
Asubqueryisasubsetofdatausedbyamainqueryfordatacomparisons.Thesubquerycontainsdata withspecifiedcriteria.Themainqueryusestheresultsofthesubqueryascomparisondata.Use subquerieswhenthedatabeingretrievedhascomplexcriteriarequirements.Forinstance,asubquery canbecreatedtoisolateonlyactivedepartmentsforasetoffinancialdatacontainingnumerous calculations.

DEFININGASUBQUERY
SubqueriesaredefinedontheEditCriteriaPropertiespagewhentheSubqueryoptionischosenasthe ExpressionTypeforExpression2.SelectDefine/EditSubquerytostartthedefinitionprocess.

Subqueriesarebuiltinthesamemannerasthemainqueryusingrecords,field,expressions,andcriteria. MultipleSubqueriesmaybeusedinasinglequery,buteachsubquerycontainsonlyonefieldofdata. BUILDSUBQUERY Createthemainquery. AddCriteriausingaSubqueryforExpressionType2. SelectDefine/EditSubquery. Createquery. Navigatebacktomainquery

Afterdefiningthesubquery,selectSubquery/UnionNavigationtodisplayahierarchicalstructureofthe mainqueryandalldefinedsubqueries.UseSubquery/UnionNavigationtoreturntothemainquery.

SpearMCQueryManagerTrainingGuide

Page103

SubQueryScenario AqueryisneededtofindAssetIDswhichhaveanactiveLocation. Step1:BuildaQueryusingtheviewnamedASSET_ALL_VW.

Step2:AddthefieldsBUSINESS_UNIT,ASSET_ID,andLOCATION.

Page104

SpearMCQueryManagerTrainingGuide

Step3:CreateacriteriastatementforLocationusingaConditionTypeofinlist.TheEditCriteria PropertiesPagedisplays.ChoseSubqueryfromtheExpression2type.SelectDefine/EditSubqueryto opentheRecordsPageandstartbuildingasubquery.

Step4:ToisolatethoseAssetIDswithoutanactiveLocation,createasubqueryusingLOCATION_TBL.

SpearMCQueryManagerTrainingGuide

Page105

Step5:SelecttheLOCATIONfieldasyouroutput,thenaddthecriteriatoindicatethatthevalueshould beactive.

Step6:SelectSubquery/UnionNavigationtonavigatebacktothemainquery.

Page106

SpearMCQueryManagerTrainingGuide

Step7:Inthemainquery,yourcriteriastatementshouldindicatethatyouonlywanttoseeAssetIDs whichhavelocationsinlistfromtheresultsofyoursubquery.

SpearMCQueryManagerTrainingGuide

Page107

INTENTIONALLYLEFTBLANK

Page108

SpearMCQueryManagerTrainingGuide

CHAPTER10BUILDINGLISTOFVALUES
BuildaListofValueswhentheInListandNotInListconditiontypesareusedincriteriadefinitions.AList ofValuesisastaticlistofdatadefinedaspartofthequerycriteria.InListvaluescanbedefinedusing existingdatavaluesorbyenteringvalues.Thecriteriafiltersdatatoitemslisted.

DEFININGLISTOFVALUES
ThelogicbehindaListofValuesisdefinedontheEditCriteriaPropertiesPage.TheEditCriteria PropertiesPageopenswhenAddCriteriaorEditisselectedontheCriteriaPage. DEFINEINLISTVALUES AccessEditCriteriaPropertiesPage DefineExpression1 SelectConditionTypeofInListorNotInList SelectInListforExpression2 SelecttheLookupTooltodefinethevaluelist

SpearMCQueryManagerTrainingGuide

Page109

AddingValuestoaList
DefinevaluesforalistusingtheEditListPage.Whendefiningalistforafieldpopulatedbypredefined data,theEditListPagewilldisplaythedatausedtopopulatethefield.Ifthefielddoesnothave predefineddata,valuesareenteredmanually.AccessEditListusingtheLookupTool. PredefinedValueList Whenafieldhasexistingvaluesinthedatabase,theywillbedisplayedontheEditListPage.SelectAdd Valueforeachitemtoincludeinthelist.

Page110

SpearMCQueryManagerTrainingGuide

Ifthefieldispopulatedbyatable,thevaluesfromthetabledisplaywhentheLookupToolisselected.

SpearMCQueryManagerTrainingGuide Page111

UserDefinedValues Whenafielddoesnothavepredefinedvalues,theuserdeterminesthedatatodisplayinthelistof values.EnterthedatainValueandselectAddValuetodefinethelist.

AddingAPrompt SelectAddPrompttoaddaprompttotheInListexpression.Thepromptwillusethevalueenteredinthe promptbytheuserinadditiontothedefinedlisttofilterdata. Note:theprompthastobeaddedfirstbeforeitcanbeusedhere.

Page112

SpearMCQueryManagerTrainingGuide

DELETINGLISTOFVALUES
Todeleteavalue,selectthecheckboxtotheleftoftheappropriateListMembersvalueandclickthe DeleteCheckedValuesbutton.TodeletetheentireInListstatement,navigatetotheCriteriaPageand selecttheDeleteiconfortheInListCriteriastatement.

SpearMCQueryManagerTrainingGuide

Page113

INTENTIONALLYLEFTBLANK

Page114

SpearMCQueryManagerTrainingGuide

CHAPTER11UNDERSTANDINGJOINS
Joinsallowdatatoberetrievedfrommultiplerecordsinasinglequery.Recordsarejoinedbycommon fieldsfromoneormorerecords.QueryManagerallowsuserstocreatehierarchy,relatedrecord,any record,outer,andleftouterjoins.

CREATINGHIERARCHYJOINS
AHierarchyJoincreatesarelationshipbetweenaparentandchildrecord.Achildrecordcontainsallthe keyfieldscontainedintheparentrecord,plusadditionalkeyfields.Parent/childrecordrelationshipsare predefinedatthedatabaselevel.WhenaHierarchyJoinisselected,thedatarelationshipisautomatically establishedbasedonthecommonfields. UseaHierarchyJointorelateageneralinformationrecordwithrecordscontainingdetailinformation. Forexample,onerecordmaycontaingeneralprojectinformation,butanotherrecordmaycontaindetail informationregardingprojects.AHierarchyJoinallowsinformationtobecombinedandretrievedfrom bothrecords.CreateHierarchyJoinsusingtheQueryPage. CREATEAHIERARCHYJOIN AddaRecordtotheQuery. Selectthefieldsfromthefirstrecord. SelectHierarchyJoin. Selecttheparentorchildtabletojoin. Selectthefieldsfromthesecondrecord.

SpearMCQueryManagerTrainingGuide

Page115

Page116

SpearMCQueryManagerTrainingGuide

DELETINGHIERARCHYJOINS
RemoveHierarchyJoinsbyselectingtheDeleteiconfortherecordontheQueryPage.Deletingthe recordremovesthejoin,fields,andcriteriadefinedusingtherecord.

DeleteIcon

CREATINGRELATEDRECORDJOINS
ARelatedRecordJoincreatesarelationshipbetweentworecordswithafieldincommon.The relationshipbetweentherecordsisdefinedatthedatabaselevel.WhenaRelatedJoinlinkisselected, thedatarelationshipisautomaticallyestablishedbasedonthecommonfield. UseaRelatedRecordJointorelatecodeinformationwithdescriptiveinformation.Forexample,one recordcontainsthefieldDepartmentID,butanotherrecordcontainstheDepartmentIDDescription.A RelatedRecordJoinretrievesboththeDepartmentIDandDescription.CreateRelatedRecordJoinsusing theQueryPage. CREATEARELATEDRECORDJOIN AddaRecordtotheQuery Selectthefieldsfromthefirstrecord. Selectjoinlinkforthedesiredfield. Selectthetypeofjointobecreated.

SpearMCQueryManagerTrainingGuide

Page117

SelectingJoinType
WhendefiningaRelatedRecordJoin,QueryManagerautomaticallydetermineswhichfieldsinthetwo tablesarerelated.Theuserisgiventheflexibilitytodefinethetypeofjointobecreated.Whenthe RelatedRecordJoinlinkisselectedforafield,theJoinPageopensandtwooptionsarepresented: StandardJoinandLeftOuterJoin.

Page118

SpearMCQueryManagerTrainingGuide

StandardJoin AStandardJoinisalsoreferredtoasanInnerJoin.Datafrombothrecordscombinetoformasingle query.Thequeryretrievesinformationfrombothrecordswherethejoinedfieldsmatch.Thefield creatingthejoindisplaysaspartoftherecorddescriptionontheQueryPage.

SpearMCQueryManagerTrainingGuide

Page119

LeftOuterJoin ALeftOuterJoinretrievesallthedatainthefirstrecordandonlymatchingdatafromthesecondrecord. Thequerywillretrieveonlyrecordsfromthesecondrecordifthejoinedfieldsmatch.Thefieldcreating thejoinwilldisplayaspartoftherecorddescriptionontheQueryPage.UseaLeftOuterJoinwhen queryingfordatafromonetablethatmayhaverelevantdatainanother.Forexample,ajournalentrywill havedatainthefinancialtables,butmayalsohaverelevantinformationinaprojecttable. CreatingaLeftOuterJoinwillretrieveallinformationcontainedinthefinancialtableandallrelevant informationcontainedintheprojecttable.

Page120

SpearMCQueryManagerTrainingGuide

DELETINGRELATEDRECORDJOINS
RemoveRelatedRecordJoinsbyselectingtheDeleteiconfortherecordontheQueryPage.Deletingthe recordremovesthejoin,fields,andcriteriadefinedusingtherecord.

DeleteIcon

CREATINGANYRECORDJOINS
AnAnyRecordJoincreatesarelationshipbetweenanytworecordsinthedatabaseregardlessofrelated fieldsofdata.Whenaddingnewrecordstoaquery,theAnyRecordJoinisestablishedbasedoncommon fieldsfortherecords. AnyRecordJoinsrelyontheuseofcriteria,definedeitherautomaticallyormanually,inordertocreatea join.Thecriteriastatementscreatedtojointherecords,willdisplayontheCriteriaPage.

SpearMCQueryManagerTrainingGuide

Page121

EnablingAutoJoin
TheAutoJoinfeatureinQueryManagerdeterminesifAnyRecordJoinsarecreatedautomaticallyor manually.AutoJoinpreferencesaredefinedforQueryManagerbyaccessingtheQueryPreferences Page.

IfEnableAutoJoinisselected,QueryManagerfindsthepredefinedrecordrelationship.Ifarelationship cannotbedeterminedorEnableAutoJoinisnotselected,defineamanualjointoassociatethetwo records.

Page122

SpearMCQueryManagerTrainingGuide

CreatingAnyRecordJoinsAutomatically
CREATEANANYRECORDJOINAUTOMATICALLY AddaNewRecordtotheQuery Selectthetypeofjointobecreated. Selecttherecordtobejoined. Selectordefinejoiningcriteria

QueryManagerattemptstocreateAnyRecordJoinsautomaticallywhenEnableAutoJoinisselectedin QueryPreferences.Whenanewrecordisaddedtoaquery,theuserispromptedtoselectaJoinType andtherecordtojoin.

AfterselectingtheJoinTypeandRecordtojoin,QueryManagerpresentsalistofcommonfieldstobe usedasjoincriteria.Thejoinspresentedmaybeselectedordeselectedaspartofthequerycriteria.

SpearMCQueryManagerTrainingGuide

Page123

Page124

SpearMCQueryManagerTrainingGuide

CreatingAnyRecordJoinsManually
CREATEANANYRECORDJOINMANUALLY AddaNewRecordtotheQuery. Selectthetypeofjointobecreated. Selecttherecordtobejoined. DefinecriteriaonCriteriaPage.

WhenEnableAutoJoinisnotselectedinQueryPreferences,theuserwillcreatearecordjoinbydefining criteriaontheCriteriaPage.Whenanewrecordisaddedtoaquery,theuserispromptedtoselectaJoin Typeandtherecordtojoin.Whenthejoinprocedureiscomplete,definecriteriaontheCriteriaPage. Thepurposeofthejoincriteriaistoidentifymatchingfieldsintherecordstoobtainassociateddata. Createanequalscriteriastatementusingthefieldsthatarethesameinbothrecords.

SelectingJoinType
WhendefiningaRelatedRecordJoin,QueryManagerwillautomaticallydeterminewhichfieldsinthe twotablesarerelated.Theuserisgiventheflexibilitytodefinethetypeofjointobecreated.Whenthe RelatedRecordJoinlinkisselectedforafield,theJoinPageisopenedandtwooptionsarepresented: StandardJoinandLeftOuterJoin.

SpearMCQueryManagerTrainingGuide

Page125

StandardJoin AStandardJoinisalsoreferredtoasanInnerJoin.Datafrombothrecordsarecombinedtoformasingle query.Thequerywillretrievetheinformationfrombothrecordsifthejoinedfieldsmatch.Thefield creatingthejoinwilldisplayaspartoftherecorddescriptionontheQueryPage.

Page126 SpearMCQueryManagerTrainingGuide

LeftOuterJoin ALeftOuterJoinretrievesallthedatainthefirstrecordandonlymatchingdatafromthesecondrecord. Thequerywillretrieveonlyrecordsfromthesecondrecordifthejoinedfieldsmatch.Thefieldcreating thejoinwilldisplayaspartoftherecorddescriptionontheQueryPage.UseaLeftOuterJoinwhen queryingfordatafromonetablethatmayhaverelevantdatainanother.Forexample,ajournalentrywill havedatainthefinancialtables,butmayalsohaverelevantinformationinaprojecttable.CreatingaLeft OuterJoinwillretrieveallinformationcontainedinthefinancialtableandallrelevantinformation containedintheprojecttable.

SpearMCQueryManagerTrainingGuide

Page127

DefiningJoinCriteria
Whenamanualjoiniscreatedtorelatetables,definethejoincriteriausingtheEditCriteriaProperties Page.Createanequalsequationbetweenafieldcommontoeachrecord.

DeletingAnyRecordJoins
RemoveAnyRecordJoinsbyselectingtheDeleteiconfortherecordontheQueryPage.Deletingthe recordremovesthejoin,fields,andcriteriadefinedusingtherecord.

Page128

SpearMCQueryManagerTrainingGuide

CHAPTER12SAVINGQUERIES
ThesavefunctioninQueryManagerallowsuserstosavequeriesforuseatfuturedates.Inaddition,a copyofapublicquerymaybesavedwhenauserneedstomakemodificationstoanexistingquery. SAVEAQUERY SelectSaveorSaveAs DefineQueryName DefineDescription DefineFolder DefineQueryType DefineOwner ProvideQueryDefinition

SpearMCQueryManagerTrainingGuide

Page129

SAVINGANEWQUERY
SelectSavetocommitanewquerytothePeopleSoftdatabase.Fornewqueries,selectingSaveopensthe SavePage.

SAVINGCHANGES
SelectSavetocommitmodificationsmadetoaquery.SelectingSaveoverwritesthequeryautomatically.

SAVINGACOPY
SelectSaveAstosaveacopyoftheexistingquery.UseSaveAswhentheoriginalqueryneedstoremain intact.SelectingSaveAsopenstheSavePage. UsethestandardquerynamingconventionsdefinedinChapter14whencreating, saving,andrenamingqueries.

Page130

SpearMCQueryManagerTrainingGuide

CHAPTER13RUNNINGQUERIES
Queryresultscanbeviewed,printed,andsavedfromanumberofformats. PeopleSoftQueryallowsresultstobeaccessedasanHTMLdocumentor ExcelSpreadsheet.Somequerieswillexecuteimmediatelyuponselectinganoption; otherswillprompttheuserforinputbeforerunningthequery.

USINGPROMPTS
Promptsareusedtonarrowqueryresults.Promptsrequiredatabeenteredbeforeaquerywillrun.After therequesteddatahasbeenentered,ViewResultscommandisusedtodisplaythedata.Dateprompts offeracalendariconforuserstoselectadate.TablePromptsofferaLookupToolforenteringcriteria. Queriesusingpromptswilldisplayinthewebbrowserbeforeallowingtheusertoopen orsavethefiletoExcel.

SpearMCQueryManagerTrainingGuide

Page131

RUNNINGTOHTML
SelectingthelinkRuntoHTMLwilldisplayqueryresultsinanewwebbrowserpage.Thequeryresults canbeprintedorsavedusingthebrowserstoolbarfunctionality.DataviewedinHTMLformatcannotbe editedormodified.

DownloadingResultstoExcel
SelectExcelSpreadsheettodownloadorviewthequeryresultsinspreadsheetformatfromtheHTML preview.DownloadoropentheresultsasanExcelfilewhenthequeryhasreturnedlessthan65,536 rowsofdata. Excelspreadsheetscancontainamaximumnumberof65,536rows.Ifthe spreadsheetcannotincludealloftherowsinyourquerythenthefirstrowwill displayinaredfontthetotalnumberofrowsofyourquerythatareincludedin thespreadsheet.

SelectopentoviewtheresultsinExcelformat.Theresultsaredisplayedinaspreadsheetwithintheweb browser.

Page132

SpearMCQueryManagerTrainingGuide

Toeditthespreadsheetdatawhileinformationisdisplayedinthewebbrowser, selectView>ToolbarstoaccesstoolbarcommandsforExcel.

SelectSavetodownloadtheresultsasanExcelfile.Provideauniquenameforthefile.Whenthe downloadiscomplete,thefilecanbeopenedinExcel.

SpearMCQueryManagerTrainingGuide

Page133

Page134

SpearMCQueryManagerTrainingGuide

SpearMCQueryManagerTrainingGuide

Page135

DownloadingResultstoCSVTextFile
SelectCSVTextfiletodownloadtheresultsintextformat.TheCSVTextfilewillopeninExcel.Usethe CSVTextformatwhenreturninglargedatasetsinthequeryresults.CSVTextremovesformattingfrom thequeryresultsbeforepresentingitasafile.Thetextfilecanbeformatted,modified,saved,andused asattachmentsinemail. SelectopentoviewtheresultsinExcelwiththeCSVTextformat.Theresultsaredisplayedina spreadsheetwithinthewebbrowser. Toeditthespreadsheetdatawhileinformationisdisplayedinthewebbrowser, selectView>ToolbarstoaccesstoolbarcommandsforExcel.

Page136

SpearMCQueryManagerTrainingGuide

SelectSavetodownloadtheresultsasanExcelfile.Provideauniquenameforthefile.Whenthe downloadiscomplete,thefilecanbeopenedinExcel.

SpearMCQueryManagerTrainingGuide

Page137

Page138 SpearMCQueryManagerTrainingGuide

RUNNINGTOEXCEL
SelecttheRuntoExcelprovidedinquerysearchresultstosendthequeryresultsdirectlytoExcel.From Excel,thedatacanbemanipulated,sorted,andformatted.Excelspreadsheetscancontainamaximum numberof65,536rows.Ifthespreadsheetcannotincludealloftherowsinyourquerythenthefirstrow willdisplayinaredfontthetotalnumberofrowsofyourquerythatareincludedinthespreadsheet. Queriesusingpromptswilldisplayinthewebbrowserbeforeallowingtheuserto openorsavethefiletoExcel.

SelectopentoviewtheresultsinExcelformat.Theresultsaredisplayedinaspreadsheetwithintheweb browser. Toeditthespreadsheetdatawhileinformationisdisplayedinthewebbrowser, selectView>ToolbarstoaccesstoolbarcommandsforExcel.

SpearMCQueryManagerTrainingGuide

Page139

SelectSavetodownloadtheresultsasanExcelfile.Provideauniquenameforthefile.Whenthe downloadiscomplete,thefilecanbeopenedinExcel.

Page140

SpearMCQueryManagerTrainingGuide

SpearMCQueryManagerTrainingGuide

Page141

Page142

SpearMCQueryManagerTrainingGuide

PREVIEWING
Whenbuildingaquery,resultscanbepreviewedusingtheRunPageinQueryManager.UsetheRunPage whenbuildingaquerytoviewqueryresults.ResultscanalsobedownloadedtoExcelusingtheRunPage.

EnablingAutoPreview
IfAutoPreviewisenabled,aquerywillrefresheachtimetheRunPageisaccessed.Otherwise,theuser willselectRerunQueryinordertoseeresultsafterchangesaremadetothequery.EnableAutoPreview byaccessingPreferencesandselectingEnableAutoPreview. DisablingAutoPreviewleavesthequeryresultsdisplayedonthePreviewPage. Thisisusefulwhenbuildingqueries.Userscanusetheprevieweddataasa referencewhencreatingandmodifyingqueries.

SpearMCQueryManagerTrainingGuide

Page143

Page144

SpearMCQueryManagerTrainingGuide

RerunQuery
IfAutoPreviewisnotenabled,selecttheRerunQuerylinktorefreshthequeryprevieweachtime changesaremadetothequerylogic.

SpearMCQueryManagerTrainingGuide

Page145

INTENTIONALLYLEFTBLANK

Page146

SpearMCQueryManagerTrainingGuide

CHAPTER14FINANCIALSDESKTOPREFERENCE
DEFININGEXCELFILETYPES
SomedesktopcomputersmaynothaveExcelfiletypesdefinedproperlyforPeopleSoftQuery downloads.FollowthestepsbelowtoinstructthequerytoopeninExcelwhenDownloadtoExcelis selected. 1. NavigatetoControlPanelfromtheStartMenu.

SpearMCQueryManagerTrainingGuide

Page147

2. AccessFolderOptionsandnavigatetoFileTypestab.HighlightXLS(MicrosoftExcelWorksheet) andselectAdvanced.

3. RemovethecheckmarksforConfirmopenafterdownloadandBrowseinsamewindow.Select OK.

Page148

SpearMCQueryManagerTrainingGuide

PLANNINGGUIDEFORBUILDINGQUERIES
PlantheQuery SelectRecords SelectFields DefineCriteria Previewandvalidateresults Save Understandingthedataandhowitisstoredinthedatabaseisanimportantaspectofbuildingqueries. Beforecreatingaqueryfordatatobepublishedordistributed,becomefamiliarwiththedata,including whereitisenteredbytheuser,whereitisstoredonthedatabase,andthedatarelationships.Taketime todesignthequery.Identifyingsomeofthecommonelementswillsavetimeandalleviateany frustrationsthatmayarise. 1. Identifythepurposeofthequery.Whatisitgoingtodo,whoistheaudience,whatisthepurpose ofthedatabeingretrieved.Summarizethequeryinacoupleofstatementstoprovidefocus duringtheprocess. 2. Identifyinformationtobeincludedinthequery.Whichfieldsandrecordswillbeused?Review thepageswhereusersenterdata.SelectingCtrl+Jwhileinadataentrypagedisplaystherecord addressforthedata.Becareful,asthisisnotalwaysthefinallocationforthedata,butitisastart fortracingfieldsandrecords. 3. Defineanyexpressions,calculations,orfunctionsneeded.Arethereanycalculationsorformatting requirements?QueryManageriscapableofusingsimpleSQLcode. 4. Identifyfiltercriteriaandprompts.Willthequerybeusedbyallbusinessunits?Cantheresultsbe limitedtoadaterangeordepartment? 5. ValidatetheQuery.Whenthequeryiscomplete,takethetimetoreviewandverifythedata beforeusingordistributinganyinformationobtainedbyaquery.

SpearMCQueryManagerTrainingGuide

Page149

INTENTIONALLYLEFTBLANK

Page150

SpearMCQueryManagerTrainingGuide

APPENDIXTABLESUSEDFORREPORTING
GeneralLedgerPS_LEDGER

BUSINESS_UNIT LEDGER Allchartfields FISCAL_YEAR ACCOUNTING_PERIOD

GeneralLedgerPS_JRNL_HEADER

BUSINESS_UNIT JOURNAL_ID JOURNAL_DATE UNPOST_SEQ

GeneralLedgerPS_JRNL_LN

BUSINESS_UNIT JOURNAL_ID JOURNAL_DATE UNPOST_SEQ JOURNAL_LINE LEDGER

GeneralLedgerPS_GL_ACCOUNT_TBL

SETID ACCOUNT EFFDT

GeneralLedgerPS_DEPT_TBL

SETID DEPT_ID EFFDT

GeneralLedgerPS_OPER_UNIT_TBL

SETID OPERATING_UNIT EFFDT

AccountsPayablePS_VENDOR

SETID VENDOR_ID

AccountsPayablePS_VENDOR_ADDR

SETID VENDOR_ID ADDRESS_SEQ_NUM EFFDT

AccountsPayablePS_VOUCHER

BUSINESS_UNIT VOUCHER_ID

AccountsPayablePS_VOUCHER_LINE

BUSINESS_UNIT VOUCHER_ID VOUCHER_LINE_NUM

SpearMCQueryManagerTrainingGuide

Page151

AccountsPayable PS_VCHR_ACCTG_LINE

BUSINESS_UNIT VOUCHER_ID UNPOST_SEQ APPL_JRNL_ID POSTING_PROCESS PYMNT_CNT VOUCHER_LINE_NUM DISTRIB_LINE_NUM DST_ACCT_TYPE CF_BAL_LINE_NUM LEDGER TAX_AUTHORITY_CD

AccountsPayablePS_DISTRIB_LINE

BUSINESS_UNIT VOUCHER_ID VOUCHER_LINE_NUM DISTRIB_LINE_NUM BUSINESS_UNIT PO_ID

PurchasingPS_PO_HDR

PurchasingPS_PO_LINE

BUSINESS_UNIT PO_ID LINE_NBR

PurchasingPS_PO_LINE_DISTRIB

BUSINESS_UNIT PO_ID LINE_NBR SCHED_NBR DST_ACCT_TYPE DISTRIB_LINE_NUM

ReceivablesPS_CUSTOMER

SETID CUST_ID

ReceivablesPS_PENDING_ITEM

GROUP_BU GROUP_ID BUSINESS_UNIT CUST_ID ITEM ITEM_LINE GROUP_SEQ_NUM

ReceivablesPS_PENDING_DST

GROUP_BU GROUP_ID BUSINESS_UNIT CUST_ID ITEM ITEM_LINE GROUP_SEQ_NUM LEDGER_GROUP LEDGER DST_SEQ_NUM

Page152

SpearMCQueryManagerTrainingGuide

ReceivablesPS_PAYMENT

DEPOSIT_BU DEPOSIT_ID PAYMENT_SEQ_NUM

ReceivablesPS_PAYMENT_ITEM

DEPOSIT_BU DEPOSIT_ID PAYMENT_SEQ_NUM BUSINESS_UNIT CUST_ID ITEM ITEM_LINE AR_SEQ_NUM

ReceivablesPS_ITEM

BUSINESS_UNIT CUST_ID ITEM ITEM_LINE

ReceivablesPS_PAYMENT_ID_ITEM

DEPOSIT_BU DEPOSIT_ID PAYMENT_SEQ_NUM ID_SEQ_NUM

ReceivablesPS_WS_ITEM

WS_BU WS_ID SUB_GROUP_ID BUSINESS_UNIT CUST_ID ITEM ITEM_LINE WS_SEQ

ReceivablesPS_ITEM_DST

BUSINESS_UNIT CUST_ID ITEM ITEM_LINE ITEM_SEQ_NUM LEDGER_GROUP LEDGER DST_SEQ_NUM

BillingPS_BI_HDR

BUSINESS_UNIT INVOICE

BillingPS_BI_LINE_DST

BUSINESS_UNIT INVOICE LINE_SEQ_NUM LINE_DST_SEQ_NUM

BillingPS_BI_LINE

BUSINESS_UNIT INVOICE LINE_SEQ_NUM

SpearMCQueryManagerTrainingGuide

Page153