Dan is totally correct. Your prompts have to be part of the Composite Query, and cannot exist in the 'base' queries. (I think I had mentioned that earlier in this thread, but I don't see it now.)
Original Message:
Sent: 1/27/2025 3:41:00 PM
From: Daniel Labrecque
Subject: RE: UNION ALL
I want to add this to Tom's directions. You will need to create these queries without prompts before using Composite Query. The prompts will need to be created within Composite Query itself.
------------------------------
Daniel Labrecque
Senior 2 Business Systems Analyst/Functional Architect
University of Nevada, Las Vegas
------------------------------
Message from the HEUG Marketplace:
------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
------------------------------
Original Message:
Sent: 01-27-2025 03:17 PM
From: Tom Johnson
Subject: UNION ALL
Hey Audrey
I think it would work. Since it sounds like both your queries pull in distinct data sets, what I would do is the following:
- In Query Manager, create a 'base ' query that encompasses all students that might get pulled in by your Source 1 and Source 2. This might be a simple query of all active students in ACAD_PROG, or a list of emplids from STUDENT_AID, or whatever. The point would be to have a query that defines your base group that all your possible students would exist in. All student returned by queries in Step 2 and 3 should exist in this base query.
- In Query Manager, create a 'Source 1' query that is the same as your (existing) upper level query you described.
- In Query Manager, create a 'Source 2' query that is the same as the (existing) lower level query.
- You will now have 3 queries total - Source Base, Source 1 and Source 2.
- In Composite Query, start by adding Source Base query. (You will be adding the other two queries to this 'base'.)
- Add the Source 1 Query, as a standard join to Source Base query
- Pull in the fields you need, arrange them in the order you want, etc.
- Add the Source 2 query, as a standard join to the Source Base query
- Pull in the fields you need, arrange them in the order you want, etc.
- Add aggregate functions, rename fields, add expressions as needed.
I think as a starting strategy, this will work. Of course, the devil is in the details, so it will probably take a little fiddling around with the data and the various queries to find out what works.
If you end up going down the Composite Query road, let us know how it goes! Good Luck, and don't hesitate to reach out.
:-)
------------------------------
Tom Johnson
Sr Business Systems Analyst
Duke University
tom.johnson@duke.edu
"None of us is as smart as all of us"
Original Message:
Sent: 01-27-2025 10:48 AM
From: Audrey Liddy
Subject: UNION ALL
Tom,
I have wondered if composite query would work for this. What my query does is pulls all positions. The top level of the query pulls all filled positions, and gives quite a bit of associated data: dept, business unit, emplid, name, pay band, midpoint, pay rate, position start date, etc. The bottom level pulls the same information but for vacant positions. I use expressions for the fields that aren't applicable such as emplid, and name. Do you think this would be possible with composite query?
Thanks!
------------------------------
Audrey Liddy
IT Business Analyst
State of New Mexico
------------------------------
Message from the HEUG Marketplace:
------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
Original Message:
Sent: 01-24-2025 01:50 PM
From: Tom Johnson
Subject: UNION ALL
Hey Audrey - As an alternative to using a Union, or creating a new view, you could also use the Composite Query tool. This tool allows you to create a single data source, pulled from other 'base' queries built in Query Manager. It accomplishes many of the things you need to do with a Union, and (in my experience) it runs pretty quickly.
Here are a couple of notes on Composite Query.
- Navigation = Main Menu> Reporting Tools> Composite Query> Composite Query Manager.
- You will need to have security for this functionality - we used the delivered Roles Composite Query Developer or Composite Query User.
- The learning curve for Composite query is not too steep. There are a set of little things to know, but those are documented in a variety of presentations and PeopleBooks.
- The biggest difference for me is that the regular, 'base' queries cannot have prompts. You add the prompts at the Composite Query level.
- I like to think of Composite Queries as data sources, similar to what we build with BI Publisher.
Good Luck, and I am happy to answer more questions...
------------------------------
Tom Johnson
Sr Business Systems Analyst
Duke University
tom.johnson@duke.edu
"None of us is as smart as all of us"
Original Message:
Sent: 01-24-2025 11:10 AM
From: Daron Wild
Subject: UNION ALL
I would probably create a new view within Application designer that does all the joins/ unions, then add that view to the Query Tree security, then write the PSQuery using the new view.
------------------------------
Daron Wild
Senior PeopleSoft Developer
University of Cambridge
------------------------------
Message from the HEUG Marketplace:
------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
Original Message:
Sent: 01-23-2025 03:01 PM
From: Audrey Liddy
Subject: UNION ALL
I'm loving this group so far!
So here's my ask--
we have a fairly complex query that uses a union-- the top query and the unioned query both pull unique data sets. The query is incredibly slow, and our DBA took a look at it and said it will run much faster using UNION ALL. Unfortunately, UNION ALL is not an option with query manager, but I have found some online references to doing this via an expression.
Have any of you done this, and if so, can you give some screenshots of how you accomplished this? I'm having a hard time understanding how to put what I've read online into practice.
Thank you,
------------------------------
Audrey Liddy
IT Business Analyst
State of New Mexico
------------------------------
Message from the HEUG Marketplace:
------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
------------------------------