Dr. Chen, Business Database Systems (Oracle) Instruction on Creating sql files and SPOOL Jason C.H. Chen, Ph.D. Professor of MIS School of Business, Gonzaga.

Slides:



Advertisements
Similar presentations
This Presentation Contains Narration and Notes To hear the narration, turn on your speakers or plug in headphones. If you would like to view this slideshow.
Advertisements

 Uses  Financials  Lists  Charts & graphs  Why Charts.
How to Use This Template Copy the presentation to your hard drive. Open the slides using slide sorter and copy slides #3, 4 and 5 for each question you.
Chapter 13 Views (up to p.495) Jason C. H. Chen, Ph.D.
How to Import an Excel File Using the SAS Import Wizard SAS 9 for Windows.
Using the What Am I Template Copy the presentation to your hard drive. Open the slides using slide sorter and copy slides #3, 4 and 5 for each question.
Reports Using SQL Script Please check speaker notes for additional information!
Chapter 3 The Enhanced E-R Model
Using the Jumble Word Template
Dr. Chen, Oracle Database System (Oracle) 1 Chapter 12 Subqueries and Merge Statements (up to p.451) Jason C. H. Chen, Ph.D. Professor of MIS School of.
World Consumption Comparison Project: Creating Your Charts Rubric and Instructions
Chapter 11 Group Functions (up to p.402)
The following slides in this presentation are templates for poster sized 42 inches by 56 inches. You can page through the templates and choose one you.
SOUL INSTALLATION Step-1 For this Please Install the Version 7.0 or SQL Server 2000 or onwards.
Submitting Book Chapters via Manuscript Central A Short Guide for Wiley-VCH Authors.
MBAC 611.  We have been using MS Access to query and modify our databases.  MS Access provides a GUI (Graphical User Interface) that hides much of the.
Review of last session The Weebly Dashboard The Weebly Dashboard Controls your account and your sites Controls your account and your sites From here you.
Access Tutorial 10 Automating Tasks with Macros
Dr. Chen, Business Database Systems (Oracle) Chapter 2 Connecting to Oracle 11g and Basic SQL SELECT Statements Jason C.H. Chen, Ph.D. Professor of MIS.
Using the Multiple Choice Template Copy this presentation to your hard drive. Open up slide sorter, copy slides #3, 4, and 5 each time you are going to.
December 10th Inservice Presenter: Linda Lopresti 9-10 English Department (K112) Contact Info: twitter:
Project 3 File, Document, Folder Management, Windows XP Explorer Windows XP Service Pack 2 Edition Comprehensive Concepts and Techniques.
School of Business Administration
Dr. Chen, Management Information Systems (Web#2) Web2 and WEB/HTML Introduction Dr. Jason C. H. Chen Professor of MIS School of Business Administration.
Dr. Chen, Oracle Database System (Oracle) 1 Database Development DDL DML DCL JL_D.B. ORACLE (SQL Components) (Retrieve Data and Produce Information from.
Dr. Chen, Oracle Database System (Oracle) 1 Chapter 4 Constraints Jason C. H. Chen, Ph.D. Professor of MIS School of Business Gonzaga University Spokane,
Project 10 Sharing Excel 2000 Data with Other Microsoft Office 2000 Applications Jason C. H. Chen, Ph.D. Professor of Management Information Systems School.
CS450 HW2Page 1 Homework #2  Due the midnight of April 15th.  100 Points  In this homework, you create an SQL script to build the MOVIES database according.
Chapter 5 Data Manipulation and Transaction Control
Copyright 2007, Information Builders. Slide 1 WebFOCUS Maintain – Enhancing Objects with JavaScript Mark Derwin Information Builders Information Builders.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
CONSTRUCTING RELATIVE & CUMULATIVE FREQUENCY DISTRIBUTIONS using EXCEL & WORD.
Dr. Chen, Oracle Database System (Oracle) 1 HW Discussion Chapter 5 (#9) –Why need two “deletes”? SQL> --9. SQL> SQL> DELETE FROM orderitems 2 WHERE order#
Dr. Chen, Oracle Database System (Oracle) 1 Chapter 6 Additional Database Objects (up to p.195 and all in the pptx file) Jason C. H. Chen, Ph.D. Professor.
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
U:/msu/course/cse/103 Day 06, Slide 1 CSE students: Do not log in yet. Review Day 6 in your textbook. Think about.
Database Reminders…. When making your table, stay in design view: Do this in design view. Not this in datasheet view.
HTML Concepts and Techniques Fifth Edition Chapter 6 Using Frames in a Web Site.
Oracle Command Spool Spool C:\temp\Lab9.lst Select Hotel_no, room_no, type, price From Room Order by Hotel_no; Spool Off.
A Guide to SQL, Seventh Edition. Objectives Understand how to use functions in queries Use the UPPER and LOWER functions with character data Use the ROUND.
BUSINESS PERFORMANCE MANAGEMENT
When I want to work with SQL, I start off as if I am doing a regular query.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
Consumer Recall Notification 1) Recall Info 2) Item Info 3) Distribution List.
Creating Pupil Accounts. Objectives that will be covered; 1.Exporting the correct data from your school’s MIS system 2.Preparing the data for upload 3.Importing.
Instructions for Uploading Points and Photos for Linking Uploading GPS points requires the following: At each site or transect note stop, “mark” a GPS.
MySQL Importing and creating a database. CSV (Comma Separated Values) file CSV = Comma Separated Values – they are simple text files containing data which.
 Start Microsoft Word from the icon or shortcut for the application. This is usually accessible from the Start Button. Then go to Programs, then Microsoft.
Project 5 Creating Interactive Pivot Table Reports and Charts Jason C. H. Chen, Ph.D. Professor of Management Information Systems School of Business Administration.
More Oracle SQL Scripts. Highlight (but don’t open) authors table, got o External data Excel, and make an external spreadsheet with the data.
Oracle PL/SQL SQL*Plus. EDIT Opens notepad with the buffer contents To use type: –Edit –Ed Opens notepad with the buffer contents To use type: –Edit –Ed.
1 Introduction to SQL *Plus Oracle SQL Interface MIS309 Database Systems.
Dr. Chen, Oracle Database System (Oracle) 1 Chapter 7 User Creation and Management Jason C. H. Chen, Ph.D. Professor of MIS School of Business Gonzaga.
Integrating Crystal Reports with SIGNZ (V3.59, July 2008) Integrating Crystal Reports with SIGNZ (V3.59, July 2008)
Creating Web Pages with Links, Images, and Embedded Style Sheets
A Guide to SQL, Sixth Edition 1 Chapter 7 Reports.
Dr. Chen, Oracle Database System (Oracle) 1 Basic Nested Queries and Views Jason C. H. Chen, Ph.D. Professor of MIS School of Business Gonzaga University.
HOW TO SAVE DOCUMENTS SPORTS MARKETING BLOCKS 1 & 4.
You can page through the templates and choose one you want to use.
A Guide to SQL, Seventh Edition
Using a set-up file to read ASCII data into SPSS
Introduction to R Commander
Q1 Jan Feb Mar ENTER TEXT HERE Notes
Basic Nested Queries and Views
Setting Up Your Personal BIT115 Workspace
Use a simple business spreadsheet provided by the centre
First, open your Workbench
Gantt Chart Enter Year Here Activities Jan Feb Mar Apr May Jun Jul Aug
Nov 5th Inservice.
Presentation transcript:

Dr. Chen, Business Database Systems (Oracle) Instruction on Creating sql files and SPOOL Jason C.H. Chen, Ph.D. Professor of MIS School of Business, Gonzaga University Spokane, WA USA

Dr. Chen, Business Database Systems (Oracle) 2 HW Create a *.sql script file using Notepad for the Hands- On Assignments (#3,5,7,9 and 1) on pp (why #1 at the end?) Name your file as Oracle_Ch2_Lname_Fname.sql (not.txt). For example, Oracle_Ch2_chen_Jason.sql Make sure the file extension should be *.sql not *.txt, otherwise, you can’t do other commands in the future. How? See detailed instruction on the next slide. Note that you need to copy and paste each sql file to SQL> (SQL Plus) and make sure each one is working properly.

Dr. Chen, Business Database Systems (Oracle) Instruction on Creating a Script file and save as *.sql file Step 1. Create SQL commands using Notepad Step 2. Click File then Save As..

Dr. Chen, Business Database Systems (Oracle) Instruction on Creating a Script file and save as *.sql file (cont.) Step 3. “Save AS” … Screen Step 4. Change from “Text Document ( *.txt) to “All Files (*.*)” on “Save as type” box

Dr. Chen, Business Database Systems (Oracle) Instruction on Creating a Script file and save as *.sql file (cont.) Step 5. Enter a right file name (Oracle_Ch2_Chen_Jason.sql)

Dr. Chen, Business Database Systems (Oracle) 6 HW (cont.) Then spool it onto the file of Oracle_ch2_Spool_Chen_Jason.txt How? See next slide Please note that the “SPOOLed” file should include both your source sql commands and the result from the Oracle.

Dr. Chen, Business Database Systems (Oracle) 7 How to Spool your Script and Output Files After you tested the script file of Oracle_ch2_Lname_Fname.sql successfully, follow the instructions below to spool both script and output files: Step 0. Run the following two script files from SQL*Plus (since you have created JLDB tables) –Start c:\oradata\chapter2\JLDB_Drop.sql –Start c:\oradata\chapter2\JLDB_Build.sql 1. type the following on SQL> –Spool c:\oradata\Oracle_ch2_Spool_Lname_Fname.txt (make sure your name is entered) 2. open Oracle_ch2_Lname_Fname.sql that you already tested 3. copy and paste all the SQL commands (including all comments) to the SQL*PLUS 4. type Spool Off on the SQL> The output should contain your personal information, all SQL commands and their solution on the.txt file and saved in C: drive (oradata\ folder) Upload the spooled file (*.txt) to the Bb (under “Assignments & Projects”) by the deadline.

Dr. Chen, Business Database Systems (Oracle) Hint for #1: Advanced SQL Commands clear screen; column format a15 wrap column format a15 word column format a20 heading ‘description for the field’ column format a15 truncate column format $ note: default is wrap -- formatting output (try it on the SQL>) -- chapter 2, Figure 2-14(b); p. 41 clear screen SET LINESIZE 80 SET PAGESIZE 45 column title format a12 heading 'Book Title' WORD column PubID format 99 heading 'ID' column Cost format $ column retail format $ SELECT * FROM books;

Dr. Chen, Business Database Systems (Oracle) ISBN Book Title PUBDATE ID COST RETAIL DISCOUNT CATEGORY BODYBUILD IN 21-JAN-05 4 $18.75 $30.95 FITNESS 10 MINUTES A DAY REVENGE OF M 14-DEC-05 1 $14.20 $22.00 FAMILY LIFE ICKEY BUILDING A C 18-MAR-06 2 $37.80 $ CHILDREN AR WITH TOOT HPICKS DATABASE IMP 04-JUN-03 3 $31.40 $55.95 COMPUTER LEMENTATION COOKING WITH 28-FEB-04 4 $12.50 $19.95 COOKING MUSHROOMS HOLY GRAIL O 31-DEC-05 3 $47.25 $ COMPUTER F ORACLE HANDCRANKED 21-JAN-05 3 $21.80 $25.00 COMPUTER COMPUTERS E-BUSINESS T 01-MAR-06 2 $37.90 $54.50 COMPUTER HE EASY WAY PAINLESS CHI 17-JUL-04 5 $48.00 $ FAMILY LIFE LD-REARING THE WOK WAY 11-SEP-04 4 $19.00 $28.75 COOKING TO COOK BIG BEAR AND 08-NOV-05 5 $5.32 $8.95 CHILDREN LITTLE DOVE HOW TO GET F 11-NOV-06 4 $17.85 $ SELF HELP ASTER PIZZA HOW TO MANAG 09-MAY-03 1 $15.40 $31.95 BUSINESS E THE MANAGE R ISBN Book Title PUBDATE ID COST RETAIL DISCOUNT CATEGORY SHORTEST POE 01-MAY-05 5 $21.85 $39.95 LITERATURE MS 14 rows selected. Here is a better output after formatting output:

Dr. Chen, Business Database Systems (Oracle) Summary on Oracle_Ch2 - see spool instruction on the next slide HW (Odd numbers only (pp.54-55), but do #1 at the end as it will affects the rest of problems) - run the following two commands: Start c:\oradata\chapter2\JLDB_Drop.sql Start c:\oradata\chapter2\JLDB_Build.sql Output should be formatted in a very good manner. Scripting file name: Oracle_ch2_Lname_Fname.sql Spooled file name: Oracle_ch2_Spool_Lname_Fname.txt Upload the spooled file (*.txt) to the Bb (under “Assignments & Projects”) by the deadline.

Dr. Chen, Business Database Systems (Oracle) Homework - Hands-On Assignments Read and Practice all examples on Chapters 2 1. Run two script files: JLDB_Drop.sql and JLDB_Build.sql 2. Read Oracle assignment and create a script file Oracle_ch2_Lname_Fname.sql for odd number questions on “Hands-on Assignments”. Use appropriate COLUMN statements to produce readable outputs 3. Execute and test one problem a time (do #1 at the end, why?) and make sure they are all running successfully. Include class and personal information. 4. When you done, spool the script files (see next slide for spooling instructions) and upload the spooled file (Oracle_ch2_Spool_Lname_Fname.txt) to Bb by midnight this coming Sunday. Turn in a hardcopy to me in the class. Upload the spooled file (*.txt) to the Bb (under “Assignments & Projects”) by the deadline.

Dr. Chen, Business Database Systems (Oracle) 12 How to Spool your Script and Output Files After you tested the script file of Oracle_ch2_Lname_Fname.sql successfully, follow the instructions below to spool both script and output files: Step 0. Run the following two script files from SQL*Plus (since you have created JLDB tables) –Start c:\oradata\chapter2\JLDB_Drop.sql –Start c:\oradata\chapter2\JLDB_Build.sql 1. type the following on SQL> –Spool c:\oradata\Oracle_ch2_Spool_Lname_Fname.txt (make sure your name is entered) 2. open Oracle_ch2_Lname_Fname.sql that you already tested 3. copy and paste all the SQL commands (including all comments) to the SQL*PLUS 4. type Spool Off on the SQL> The output should contain your personal information, all SQL commands and their solution on the.txt file and saved in C: drive (\oradata\ folder) Upload the spooled file (*.txt) to the Bb (under “Assignments & Projects”) by the deadline.