Commit cf04a6b7 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

9780596007461

0 → 120000
+1 −0
Changes for 9780596007461: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
9780596007461
 No newline at end of file

README.md

0 → 100644
+15 −0
Changes for README.md: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
## Example files for the title:  
  
# Oracle SQL*Plus: The Definitive Guide 2nd Edition, by Jonathan Gennick
  
[![Oracle SQL*Plus: The Definitive Guide 2nd Edition, by Jonathan Gennick](http://akamaicovers.oreilly.com/images/9780596007461/cat.gif)](https://www.safaribooksonline.com/library/view/title/0596007469//)
  
The following applies to example files from material published by O’Reilly Media, Inc. Content from other publishers may include different rules of usage. Please refer to any additional usage rights explained in the actual example files or refer to the publisher’s website.
  
O'Reilly books are here to help you get your job done. In general, you may use the code in O'Reilly books in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from our books does not require permission. Answering a question by citing our books and quoting example code does not require permission. On the other hand, selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Incorporating a significant amount of example code from our books into your product's documentation does require permission.
  
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN.
  
If you think your use of code examples falls outside fair use or the permission given here, feel free to contact us at <permissions@oreilly.com>.
  
Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.

SQLPlusData.tar.gz

0 → 100755
+4.63 KiB

File added.

No diff preview for this file type.

SQLPlusData/bld_db.lst

0 → 100644
+47 −0
Changes for SQLPlusData/bld_db.lst: 47 added lines, 0 removed lines.
Original line number Diff line number Diff line

This script creates the tables and sample data needed
to run the examples in the SQL*Plus book.

Do you wish to continue (Y/N)?Y

C                                                                               
-                                                                               
y                                                                               

You have the option of dropping the sample
tables before creating them. This is useful
if you have previously created the sample
tables, and are recreating them in order to
reload the original data.

Do you wish to DROP the tables first (Y/N)?Y

C                                                                               
-                                                                               
y                                                                               

Dropping the sample tables...

Creating employee table...

Creating project table...

Creating project_hours table...
CREATE TABLE clob_example (
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object 



Creating projects...

Creating Employees...

Creating employee time log entries for 2004...



Thank-you for loading the sample data!
Please press ENTER.

SQLPlusData/bld_db.sql

0 → 100644
+48 −0
Changes for SQLPlusData/bld_db.sql: 48 added lines, 0 removed lines.
Original line number Diff line number Diff line
SET ECHO OFF
SET VERIFY OFF
SET FEEDBACK OFF
SET DEFINE '&'
SET SCAN ON
SET TERMOUT ON

spool bld_db.lst

--Tell the user what we are about to do, and confirm
--that the user wishes to proceed.
PROMPT
PROMPT This script creates the tables and sample data needed
PROMPT to run the examples in the SQL*Plus book.
PROMPT
ACCEPT continue_flag CHAR PROMPT 'Do you wish to continue (Y/N)?'

--Execute the appropriate command file based on the
--user's response. Note that the Y/N response is used to form
--the name of the next file we should execute.
--TERMOUT is set off so that the user does not
--see any errors caused by the file not existing.
define bld_db1_flag = 'n'
SET TERMOUT OFF
COLUMN continue_flag NEW_VALUE continue_flag
SELECT LOWER('&continue_flag') continue_flag FROM dual;
@@bld_db1&continue_flag
SET TERMOUT ON

--If one the BLD_DB1X files was not executed, then
--bld_db1_flag will still be N. In that case we display an
--error message.
SET SERVEROUTPUT ON
PROMPT
BEGIN
  IF '&BLD_DB1_FLAG' = 'n' THEN
    DBMS_OUTPUT.PUT_LINE('You must answer either Y or N.');
    DBMS_OUTPUT.PUT_LINE('Please rerun the command file and answer correctly.');
  END IF;
END;
/

PROMPT
PROMPT Thank-you for loading the sample data!
PAUSE Please press ENTER.

spool off
Loading