Editing Logical SQL Generated by a Request

Download Report

Transcript Editing Logical SQL Generated by a Request

Oracle Business Intelligence Answers:
Advanced Features
Copyright © 2009, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to:
• Combine request criteria by using set operations
• Execute direct database requests
• Edit logical SQL that is generated by a request
• Creating a link to a saved request
• Create an Excel Web Query file
23 - 2
Copyright © 2009, Oracle. All rights reserved.
Advanced Features
•
•
•
•
•
23 - 3
Combining request criteria by using set operations
Executing direct database requests
Editing logical SQL generated by a request
Creating a link to a saved request
Creating an Excel Web Query file
Copyright © 2009, Oracle. All rights reserved.
Combining Request Criteria
by Using Set Operations
Combine criteria from one or more subject areas:
• Subject areas may be organized with similar information
depending on business needs.
Combine results from two or more requests into a single
request:
• Example: Combine results from a subject area
containing all active customers with results from a
subject area containing customers who have ordered
one or more products.
23 - 4
Copyright © 2009, Oracle. All rights reserved.
Set Operators
Set operators and their effects on results:
Set Operator Effect on Results
Union
Returns nonduplicate rows from all requests
Union All
Returns all rows from all requests
Intersect
Returns rows that are common to all requests
Minus
Returns rows from first request that are not in other requests
Union
Request 1 Request 2
Union All
Request 1 Request 2
Row AAA
Row BBB
Row AAA
Row BBB
Row BBB
Row CCC
Row BBB
Row CCC
Intersect
23 - 5
Minus
Request 1
Request 2
Request 1
Request 2
Row AAA
Row BBB
Row AAA
Row BBB
Row BBB
Row CCC
Row BBB
Row CCC
Copyright © 2009, Oracle. All rights reserved.
Combining Results of Multiple Requests
1.
2.
3.
4.
5.
23 - 6
Build a request.
Combine with a similar request.
Construct the combined request.
Apply a set operator.
Check the results.
Copyright © 2009, Oracle. All rights reserved.
1. Build a request.
Build a request with desired columns and filters.
Request returns
customers with
dollars between
5000 and 15000.
23 - 7
Copyright © 2009, Oracle. All rights reserved.
2. Combine with a similar request.
Click the “Combine with Similar Request” button and
select a subject area.
Select the same
subject area or a
different subject area.
23 - 8
Copyright © 2009, Oracle. All rights reserved.
3. Construct the combined request.
Add columns and filters to the new request.
Click Edit to add
additional criteria.
The number of
columns and
data types must
be consistent
across all
criteria.
23 - 9
New request returns
customers with
dollars between
10000 and 20000.
Copyright © 2009, Oracle. All rights reserved.
4. Apply a set operator.
Click the Set button and select the set operator.
Combined request
returns the union of
customers with
dollars between 5000
and 20000.
23 - 10
Copyright © 2009, Oracle. All rights reserved.
5. Check the results.
Results of two or more requests are combined into a single
request.
The table displays the union
of all customers with dollars
between 5000 and 20000.
23 - 11
Copyright © 2009, Oracle. All rights reserved.
Direct Database Request Privileges
• Users with appropriate privileges can create and issue
direct database requests to physical back-end data
sources.
– Results can be displayed and manipulated in Oracle
Business Intelligence Answers and incorporated into
Interactive Dashboards.
• Required privileges include:
– Edit Direct Database Requests
– Execute Direct Database Requests
23 - 12
Copyright © 2009, Oracle. All rights reserved.
Changing Direct Database Request Privileges
Changes are made in Oracle BI Presentation Services
Administration.
1
2
3
23 - 13
Copyright © 2009, Oracle. All rights reserved.
Creating and Executing
a Direct Database Request
1. Create a direct request.
2. Construct a direct database request.
3. Check the results.
23 - 14
Copyright © 2009, Oracle. All rights reserved.
1. Create a direct request.
Click Create Direct Request on the Answers start page.
23 - 15
Copyright © 2009, Oracle. All rights reserved.
2. Construct a direct database request.
Follow the on-screen instructions to create the request.
1
2
4
3
5
23 - 16
Copyright © 2009, Oracle. All rights reserved.
3. Check the results.
Results are displayed in the Answers workspace.
23 - 17
Copyright © 2009, Oracle. All rights reserved.
Editing Logical SQL Generated by a Request
For advanced users and developers with specific
privileges:
1
2
3
23 - 18
Copyright © 2009, Oracle. All rights reserved.
Editing Logical SQL Generated by a Request
23 - 19
Copyright © 2009, Oracle. All rights reserved.
Creating a Link to a Saved Request
For users with permission to access the Advanced tab:
1
2
3
23 - 20
Copyright © 2009, Oracle. All rights reserved.
Creating an Excel Web Query File
For users with permission to access the Advanced tab:
1
2
3
23 - 21
Copyright © 2009, Oracle. All rights reserved.
Viewing an Excel Web Query File
1
2
3
23 - 22
Copyright © 2009, Oracle. All rights reserved.
Summary
In this lesson, you should have learned how to:
• Combine request criteria by using set operations
• Execute direct database requests
• Edit logical SQL that is generated by a request
• Create an Excel Web Query file
23 - 23
Copyright © 2009, Oracle. All rights reserved.
Practice 23: Overview
This practice covers the following topics:
• Combining requests by using set operations
• Executing direct database requests
23 - 24
Copyright © 2009, Oracle. All rights reserved.