Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create add a "Select All" option as a query row?

796616Sep 8 2010 — edited Sep 8 2010
This query feeds a dropdown menu in an MSBI report that I'm working on. Whatever the user chooses in this dropdown will be fed to the main report query that uses a "where" clause.

What I want to do is select each of our sales forces but also have an option for "Select All" which will tell the main report query to display all sales forces.

Here's my question: The "Select All" part works fine but I want to have it show up at the TOP of the resulting rows.

Any idea how to get this artificial "Select All" to show up at the top? I've tried various "Order by" options but haven't found the correct one. Thanks!

------------------------------
select 'Select All' as SALESFORCE
from my_table
union
select distinct SALESFORCE from my_table
------------------------------
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2010
Added on Sep 8 2010
9 comments
1,030 views