Professional Documents
Culture Documents
• Q&A
Why Logical SQL?
• Logical SQL is SQL developer tool
• Supports more complex logic that can be not accommodated in Answers
• It allows customers to write ANSI-like SQL while leveraging OTBI subject
areas
– Use the same OTBI business semantic model
– Use the same OTBI user data security
– Use OTBI flexfields
• Minimize custom SQL BIP reports
Introducing Logical SQL
Raghavendra Raghunath
Product Manager, HCM OTBI, Oracle
Introduction to Logical SQL(LSQL)
• The report built using the logical sql generates the report showing the entire salary
history along with the associated performance rating during each salary review
Where to View or Edit LSQL
• ‘Advanced Tab -> SQL Issued’ pane gives you
New Subject Areas
the Logical SQL issued by Oracle BI
Presentation services.
• With Admin privileges you can also view
Logical SQL in ‘Manage Sessions’ page in the
Administration tab
How to write LSQL?
• Let us look at how Ronnie constructed the lsql that solved her reporting
requirement
New Subject Areas
Use Case – Create a report to show all the salary changes for a worker and
the corresponding performance rating during those years
Solution – This reporting requirement involves two subject areas
– Compensation – Salary History Details Real Time : This subject area gets all the
salary changes for the worker
– Workforce Performance – Performance Rating Real Time: This subject area gets
the performance document period name and the corresponding ratings
How to write LSQL?
C:\Users\
rwraghun.ORADEV\Desktop\Salary H
How to write LSQL?
• The constructed logical sql must be pasted into the SQL Issued pane for a new analysis.
• TheNew Subject Areas
report output for the individual queries and newly created logical sql is as below
LSQL – multiple datasets
D:\OTBI\
Customers\ANZ\Manager Position LS
LSQL – Current and Prior Rows
• Another classic case to use the lsql is to get the current and previous jobs of workers
New Subject Areas
Use Case – Print the Worker Name, current job, previous job in the report
Limitation using drag and drop – The current and previous jobs cannot be displayed in the same row as
two different columns since the values come from the same attribute and no filter criteria can get the
respective values.
This example leverages the RCOUNT function to get the recent and the immediate previous record for
employees from the Worker Assignment Event subject area
D:\OTBI\
Customers\Customer Connect\curren
LSQL – Control Effective Date Logic
Use Case – Use effective date range join to join Performance Review docs with Salary History
Limitation
New using dragAreas
Subject and drop – Depending on the common dimensions selected, an equal join on the common
dimensions, e.g. Worker can either result in a cartesian join with all performance ratings returned per salary or
records get pruned
D:\User\Product
Strategy\OBI App Dev\Fusi
Considerations in Writing Logical SQL
• Use Answers where possible
• Reserve Logical SQL for complex logic
• Study and re-engineer the logical SQLs generated by the system
• Code for query performance
Developer Experience with Logical SQL
Colin Foyle - Succeed Consultancy Ltd
Questions?