Working with Unions


Concept


Steps:

  1. Begin by navigating to the Expressions page.

     

    Click the Reporting Tools link.

    Step 1
  2. Click the Query Manager link.

    Step 2
  3. In this example, you will search for the PT_SEC_ACCESSLOG_DAY query.

     

    Enter the desired information into the begins with field. Enter

     a valid value
     e.g.
     "pt_sec"
    .

    Step 3
  4. Click the Search button.

    Step 4
  5. Click an entry in the Edit column.

    Step 5
  6. Click the Expressions tab.

    Step 6
  7. Use the Expressions page to view or edit expressions for queries.

    Step 7
  8. In this example, you will add a new expression.

     

    Click the Add Expression button.

    Step 8
  9. Use the Edit Expression Properties page to define expressions for queries.

    Step 9
  10. Enter the desired information into the Length field. Enter

     a valid value
     e.g.
     "8"
    .

    Step 10
  11. Click the Add Field link.

    Step 11
  12. Click the User ID link.

    Step 12
  13. Click the OK button.

    Step 13
  14. Click an entry in the Use as Field column.

    Step 14
  15. Click the Save button.

    Step 15
  16. The New Union link is available on the bottom of each Query Manager page, except for the Run page.

     

    Click the New Union link.

    Step 16
  17. Use the Records page to select the records on which to base the new query.

    Step 17
  18. After you click the New Union link, PeopleSoft Query automatically switches to the Records page so that you can start defining the second query.

     

    Enter the desired information into the begins with field. Enter

     a valid value
     e.g.
     "PT_SEC"
    .

    Step 18
  19. Click the Search button.

    Step 19
  20. Click an entry in the Add Record column.

    Step 20
  21. Use the Query page to add fields to the query content.

     

    You can also add additional records by performing joins.

    Step 21
  22. When you’re working on a union, each individual selection looks like an independent query, and for the most part they are independent.

     

    However, the first selection in the union—the one that you started before clicking the New Union link—has a special status.

     

    PeopleSoft Query determines the ordering of the rows and columns based on what you specify for the first selection. It also uses the column headings that you defined for the first selection.

    Step 22
  23. Use the Subquery/Union Navigation link to navigate between the main query, subqueries, and unions.

    Step 23
  24. In this example, you will select all fields.

     

    Click the Check All button.

    Step 24
  25. Click the Expressions tab.

    Step 25
  26. In this example, you will add a new expression.

     

    Click the Add Expression button.

    Step 26
  27. Enter the desired information into the Length field. Enter

     a valid value
     e.g.
     "8"
    .

    Step 27
  28. Click the Add Field link.

    Step 28
  29. Click the Temp Table Instance link.

    Step 29
  30. Click the OK button.

    Step 30
  31. Click the Save button.

    Step 31

You have successfully worked with unions.

Table of Contents  Start Topic