Why I Wrote This BookMy motivation for writing this book stems from my early experiences learning about the Oracle database. Oracle's documentation tends to be narrowly focused, each manual discussing only those things strictly related to the product being written about, and the manual for SQL*Plus is no exception. Oracle's manual will tell you about SQL*Plus but only about SQL*Plus. There is little information on how to use SQL*Plus in conjunction with other Oracle products such as PL/SQL or SQL*Loader. There is also little information on using SQL*Plus to perform common tasks like viewing a constraint definition or extracting data.I remember clearly the difficulties I had working with three manuals spread out in front of me: the SQL manual, the SQL*Plus manual, and the PL/SQL manual. I remember the frustration of frequently picking up the wrong manual because I didn't understand fully the relationship between these three products. Was DESCRIBE a SQL statement? How could I use a SQL*Plus variable in a PL/SQL script?Even when I knew that something could be done with SQL*Plus, I frequently didn't find clear direction in the Oracle manuals. The first time I wrote a script to extract data to a file, I spent quite a bit of time flipping back and forth in the manual and experimenting with various commands before I finally got the results I wanted. Things became even more complicated when I began to write scripts and batch jobs with SQL*Plus. Suddenly I found myself wanting to branch, and even to loop, from a SQL*Plus script. SQL*Plus doesn't officially provide this functionality, but there are some tricks you can put to good use.Finally, this is the book I want to give my clients and coworkers when they ask me how-to questions. Next time I'm asked how to get data out of Oracle and into a comma-delimited file, I'll just refer them to Chapter 9. When I'm asked about formatting a report, I'll refer them to Chapter 5, and when I'm asked how to write an IF statement in SQL*Plus, I'll refer them to Chapter 11. Each of these chapters presents a solution to its respective problem and leads you step by step through the process of implementing that solution. |