Week 7 March 8 SQL: Chronological Sort, SUBSTRing, ROUND

Slides:



Advertisements
Similar presentations
Browse the codebook - to see the list of variables on which you can do statistics select the “Browse codebook in this window” option and then click “Start”
Advertisements

Live Excel PRESENTER: Brad Leupen | CTO, Entrinsik |
Interactive Reporting v3.2. Multiple Order By Option Set multiple order by options.
© Paradigm Publishing, Inc Access 2010 Level 1 Unit 2Creating Forms and Reports Chapter 6Creating Reports and Mailing Labels.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Mark Dixon Page 1 07 – Reports. Mark Dixon Page 2 Session Aims & Objectives Aims –To use reports to produce more readable documents Objectives, by end.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
7 Copyright © 2004, Oracle. All rights reserved. Working with Text Items.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Introduction To Form Builder
Data Forms in Hyperion Planning. Data Forms are used by the business users and planners to enter, update and analyze the data. Actually, data forms.
SiS Technical Training Development Track Technical Training(s) Day 1 – Day 2.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
Attribute databases. GIS Definition Diagram Output Query Results.
SEMESTER 1, 2013/2014 DB2 APPLICATION DEVELOPMENT OVERVIEW.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
Developers of a suite of products to help you monitor and optimize Windows/SQL Server performance o Performance Advisor – awareness and control over Windows.
Tools Menu and Other Concepts Alerts Event Log SLA Management Search Address Space Search Syslog Download NetIIS Standalone Application.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
Basic Semantics Associating meaning with language entities.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
What is the last executed Query on the block?. Why does a execute query on the block not return any records back (D2K in EBS) After executing the query.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
1 Guide to Oracle10G CHAPTER 7: Creating Database Reports 7.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
1 R. Ching, Ph.D. MIS Area California State University, Sacramento Week 4 February 15 LOV: List of ValuesLOV: List of Values Dealing with Errors and ProblemsDealing.
Use SPSS for solving the problems Lecture#21. Opening SPSS The default window will have the data editor There are two sheets in the window: 1. Data view2.
1 R. Ching, Ph.D. MIS Area California State University, Sacramento Week 13 April 26 Pseudo Drill-Down GraphsPseudo Drill-Down Graphs.
Oracle Business Intelligence Foundation - Commonly Used Features in Repository.
22 Copyright © 2009, Oracle. All rights reserved. Filtering Requests in Oracle Business Intelligence Answers.
Preface IIntroduction Course Objectives I-2 Course Content I-3 1Introduction to Oracle Reports Developer Objectives 1-2 Business Intelligence 1-3 Enterprise.
1 Chapter 6: Creating Oracle Data Block Forms. 2 Forms  Application with a graphical user interface that looks like a paper form  Used to insert, update,
CHAPTER 7 LESSON B Creating Database Reports. Lesson B Objectives  Describe the components of a report  Modify report components  Modify the format.
IFS180 Intro. to Data Management Chapter 10 - Unions.
1 R. Ching, Ph.D. MIS Area California State University, Sacramento Week 8 March 22 Creating a Matrix and Drill-down/Roll-up ReportCreating a Matrix and.
Overview Rental Quote Overview
Web Database Programming Using PHP
IWS/Graph – Product Presentation
Managing, Storing, and Executing DTS Packages
Working with Data Blocks and Frames
Working in the Forms Developer Environment
Creating & Editing Reports
Creating LOVs and Editors
Lexical Reference Variables in Graphics and List Box in Forms
WebCSA Waterloo Information Systems Limited presents
Web Database Programming Using PHP
This shows the user interface and the SQL Select for a situation with two criteria in an AND relationship.
Review: Chapter 5: Syntax directed translation
Current outstanding balance
Crystal Reports 2011 Tom Vorves Eduardo Holly Sim Rodell Akin Jenny
Intro to CS Nov 13, 2017.
Creating Charts & Dashboards
Lesson 2 Notes Chapter 6.
CIS16 Application Programming with Visual Basic
Chapter 6: Creating Custom Forms
Chapter 15 Introduction to Rails.
Introduction to Customizing Reports in SAP
Creating Noninput Items
Creating a Master-Detail Form
Best Practices Consortium
Contents Preface I Introduction Lesson Objectives I-2
XINFO – Programming Languages zOS – Cobol
Reports Report builder meets the challenge by making it easy to design, publish, and distribute professional, production-quality reports in a variety of.
Browse the codebook - to see the list of variables on which you can do statistics select the “Browse codebook in this window” option and then click “Start”
Manufacture Part Search Template Overview
Presentation transcript:

Week 7 March 8 SQL: Chronological Sort, SUBSTRing, ROUND Dynamic SQL: Host and Lexical Reference Variables Overview: Drill-down, Roll-up Reports

Chronological sort Month sequence in the calendar Order by the month’s sequence

Without Chronological Order

Length Beginning position SUBSTR captures only parts of a string

Without SUBSTR Wasted space

ROUND rounds a number to a specified number of decimal places

Without ROUND

Order by Quarter

Dynamic SQL As opposed to static SQL, dynamic SQL allows the user to specify parts of the query (i.e., column names, table names, conditions, etc.) during runtime For example (static SQL): SQL> select manufacturer_code, to_char(sales_month_97,'q'), 2 sum(sales_revenue_97), sum(sales_revenue_98) 3 from sales_97_98 4 where lower(manufacturer_code) = 'son' 5 group by manufacturer_code, to_char(sales_month_97,'q') 6 order by to_char(sales_month_97,'q'); The same columns, table and condition are used

Dynamic SQL With dynamic SQL, parts of the query can be substituted by variable names During run time, the user will specify a value for P_time_interval Lexical reference variable name Lexical reference variable designator Host variable select manufacturer_code, &P_Time_interval, sum(sales_revenue_97), sum(sales_revenue_98) from sales_97_98 where lower(manufacturer_code) = :P_manufacturer_code group by manufacturer_code, to_char(sales_month_97,'q') order by &P_Time_interval; Host variable designator

Creating a Lexical Reference Variable Create a lexical reference variable under User Parameters of the Data Model (in the Object Navigator) Select  Create

Create a User Parameter Default name Select the new parameter, right-mouse click and select Property Palette

Change the Properties Change the name Change the data type to character Assign an initial value (optional)

Insert the Lexical Reference Variables (User Parameters)

Lexical reference variables During Runtime... Host variable Lexical reference variables (default values) Host variable

Drill-Down, Roll-up Reports A drill-down report is actually two or more reports working together The top-level report is like a master record Launches a report that provides more details about the data in its current record Generally, the detail report displays information related to the master Provides details for a single record, a group of records, or the report as a whole Master report "links" to the detail report by passing parameters that control the execution of the detail Master Detail

Drill-Down Reports Master Report (Annual) Data Model 1 Parameter-list1 (Quarters) Data Model 2 Parameter-list2 Drill-down Report (Months) Data Model 2

+ =

Annual

Quarters

Months within a Quarter