More on Oracle Scripts CSC 240 (Blum).

Slides:



Advertisements
Similar presentations
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
Advertisements

JavaScript 101 Lesson 01: Writing Your First JavaScript.
Chapter 7 Data Management. Agenda Database concept Import data Input and edit data Sort data Function Filter data Create range name Calculate subtotal.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Pasewark & Pasewark 1 Access Lesson 6 Integrating Access Microsoft Office 2007: Introductory.
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
1 Access Lesson 6 Integrating Access Microsoft Office 2010 Introductory Pasewark & Pasewark.
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.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
1 Insert, Update and Delete Queries. 2 Return to you Address Book database. Insert a record.
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,
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
Press Esc to Exit ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
Enhancing Web Pages  Use Notepad to open any html file  Adding an Animation  Google search ‘free animation’  After saving one, add it to the web page.
CSC 240 (Blum)1 E-A-G-L-E-S. CSC 240 (Blum)2 Go to the Philadelphia Eagles site – the roster page (
CSC 240 (Blum)1 Forms and Importing Data in Access.
How to Create a Document in Google Drive By Tressa Beckler.
Intro to SQL| MIS 2502  Spacing not relevant › BUT… no spaces in an attribute name or table name  Oracle commands keywords, table names, and attribute.
Creating Tables and Inserting Records -- Not easy to edit! -- check constraints! Create table test1 ( C1 char(5) primary key, C2 Varchar2(15) not null.
# 1# 1 Creating Tables, Setting Constraints, and Datatypes What is a constraint and why do we use it? What is a datatype? What does CHAR mean? CS 105.
CSC 240 (Blum)1 Introduction to Access CSC 240 (Blum)2 Click on the Access desktop icon or go to Start/Programs/Microsoft Office/Microsoft Office.
CERTIPORT EXCEL PRACTICE. EDITING SORT/FILTER/FIND & REPLACE In the Summary worksheet, sort the data in descending order by Order Number, and then in.
Labcheck Next Generation Quick Start Guide Filters.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
MySQL Importing and creating a database. CSV (Comma Separated Values) file CSV = Comma Separated Values – they are simple text files containing data which.
CSD 340 (Blum)1 Starting JavaScript Homage to the Homage to the Square.
Files Tutor: You will need ….
Agenda for Class 2/20/2014 Introduce Microsoft’s SQL Server database management system. Use the lab to discuss how to CREATE, DROP and populate (INSERT)
Managing Database With Oracle Replacement for Ch10 COP 4708.
Creating Web Documents: JavaScript Ftp / file management: review Introduction to JavaScript Sources Homework: start review for midterm, work on Project.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
# 1# 1 Moving SQL Data Across Applications How do you export and import data into or out of a database? What do we mean by.csv? CS 105 Spring 2010.
More Oracle SQL Scripts. Highlight (but don’t open) authors table, got o External data Excel, and make an external spreadsheet with the data.
Open the index.html Open this PowerPoint from the S Drive IDT folder Chapman Images.ppt.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Basic SQL*Plus edit and execute commands SQL*Plus buffer and built-in editor holds the last SQL statement Statements are created in free-flow style and.
IMS 4212: Constraints & Triggers 1 Dr. Lawrence West, Management Dept., University of Central Florida Stored Procedures in SQL Server.
CSC 230 (Blum)1 Getting a List of Colors. CSC 230 (Blum)2 Imagine a program in which you want a list of colors in a ComboBox.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Instructions for transferring names and addresses from a MS WORD table (previously created for printing address labels) to MS Excel for upload to SendOutCards.
My Favorite Top 5 Free Keyword Research Tools –
Microsoft Word Mail Merge Versions Mail Merge Follow this tutorial exactly to produce a merge using data from a Word table and the business letter.
DEVRY CIS 336 W EEK 5 G ROUP P ROJECT T ASK 3 Check this A+ tutorial guideline at
FAST STUDENT Your Chance to Learn!. FAST STUDENT Your Chance to Learn!
Y.-H. Chen International College Ming-Chuan University Fall, 2004
Making a JSON file.
© 2016, Mike Murach & Associates, Inc.
and Defining Table Relationships
This shows the user interface and the SQL Select for a situation with two criteria in an AND relationship.
Applied CyberInfrastructure Concepts Fall 2017
Gathering test scores for Slo data
All Powder Board and Ski
Kanban Task Manager Single‒ Introduction
MySQL and PHPMyAdmin.
ORACLE SQL Developer & SQLPLUS Statements
Structured Query Language (SQL) William Klingelsmith
Introduction to Access 2003
Poor Naming Standards.
Files and Parsing CSC 265 (Blum).
Another way Here is a different, possibly better way to deal with the problem of the height (e.g. 5-11) being converted to a date (e.g. May 11, 2004) when.
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
HOW TO CREATE A CLASS Steps:
Data Management Innovations 2017 High level overview of DB
Queries and Lookups.
Lesson 1 - Automating Tasks
Help..
Tutorial 8 Sharing, Integrating, and Analyzing Data
Argos, Excel and Pivot Tables
Argos, Excel and Pivot Tables
Presentation transcript:

More on Oracle Scripts CSC 240 (Blum)

Camping Equipment Revisited CSC 240 (Blum)

Code for table creation: note comments and domain constraints CSC 240 (Blum)

Something of a shortcut to inserting the Customer data. Take the Customer data from the posted solution to the camping exercise and paste it into Excel. Insert a column before the data and enter: INSERT INTO Customer VALUES( Copy the value down. In the column after the data, enter ); CSC 240 (Blum)

Before CSC 240 (Blum)

After CSC 240 (Blum)

Save the Excel file as a CSV file. CSC 240 (Blum)

Open the csv file in Notepad. CSC 240 (Blum)

Go to Edit/Replace Replace a comma with a single quote followed by a comma followed by a space followed by a single quote CSC 240 (Blum)

Replace open parenthesis followed by single quote followed by comma followed by space with open parenthesis. CSC 240 (Blum)

Result: CSC 240 (Blum)

Replace comma followed by space followed by single quote followed by close parenthesis with close parenthesis. CSC 240 (Blum)

Result: CSC 240 (Blum)

Add INSERT Code to CREATE code and add a SELECT to check. CSC 240 (Blum)

Result: CSC 240 (Blum)

Result of running script (I) CSC 240 (Blum)

Result of running script (II) CSC 240 (Blum)

Something to watch out for The INSERT statement we use assume that the order of the values is the same as the order of fields in the CREATE TABLE statement. If this were not the case you can use Excel to change the order of the columns. CSC 240 (Blum)

Proceed Create an Item table (don’t forget a primary key). Insert the item data. Create a table for the order. Note that “Order” is not an acceptable name for a table in Oracle – so change it. Also note that “Date” is a type and should not be used as the name of a field. Don’t forget the order table has foreign keys. CSC 240 (Blum)

Let us add a step in our procedure CSC 240 (Blum)

High the column with the dates and go to Format/Cells, select Date from Category and select the type shown below. CSC 240 (Blum)

This is the format for dates preferred by Oracle. CSC 240 (Blum)

Insert data in CustOrder table. CSC 240 (Blum)

Result of SELECT CSC 240 (Blum)

CREATE statement pasted from script CSC 240 (Blum)

New Problem Our procedure added single quotes but when we have numbers we do not want the quotes. CSC 240 (Blum)

Try adding a column of *’s before numbers and & after (use characters you do not expect in the rest of the data). CSC 240 (Blum)

After replacing , with ‘, ‘ CSC 240 (Blum)

Then replace ‘*’, ‘ with nothing CSC 240 (Blum)

Result CSC 240 (Blum)

Replace ‘, ‘&’ with nothing CSC 240 (Blum)

Result CSC 240 (Blum)

Replace & with nothing CSC 240 (Blum)

Result CSC 240 (Blum)

Integrity: The ItemNum was I7777 and we tried to insert 17777 CSC 240 (Blum)

Integrity: there was no Order number 6. CSC 240 (Blum)

SELECT Customer C2727 CSC 240 (Blum)

Adam Adams 8475 Oak Lane not 8745 Oak Lane CSC 240 (Blum)