|
|
 |
Blogs Toad and Database Commentaries |
Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies. Have some views of your own to share? Post your comments! Note: Comments are restricted to registered Toad World users.
Do you have a topic that you'd like discussed? We'd love to hear from you. Send us your idea for a blog topic.

 |
 |
|
|
 |
 |
|
Author: |
StevenFeuersteinTW |
Created: |
Thursday, October 26, 2006 10:47 AM |
 |
 |
Steven Feuerstein is considered one of the world's leading experts on the Oracle PL/SQL language, having written ten books on PL/SQL (all published by O'Reilly Media, including Oracle PL/SQL Programming. Steven has been developing software since 1980, spent five years with Oracle (1987-1992) and has served as PL/SQL Evangelist for Quest Software since January 2001. He is also an Oracle ACE Director. He writes regularly for Oracle Magazine, which named him the PL/SQL Developer of the Year in both 2002 and 2006.
Steven's blog provides advice and code that you can put to immediate use in your world of programming.
Recent postings on PL/SQL:
|
|
|
Say goodbye to hard-coding! |
|
StevenFeuersteinTW
|
Monday, March 01, 2010 9:26 AM
|
|
|
|
We all know that hard-coding is a bad thing in software. But most developers think of hard-coding simply as typing a literal value into your program whenever you need it.
|
 |
|
|
Read More...
|
|
|
Code Tester Version 1.9 Now Available! |
|
StevenFeuersteinTW
|
Thursday, February 18, 2010 7:15 AM
|
|
|
You can now download version 1.9 of Code Tester. This release features the following enhancements:
Object type support You can now test directly the methods of object types, test the contents of object type instances for e ...
|
 |
|
|
Read More...
|
|
|
|
Binding sparse arrays in a FORALL statement |
|
StevenFeuersteinTW
|
Monday, November 23, 2009 8:44 AM
|
|
|
|
FORALL was introduced into PL/SQL in Version 8i. It is a fantastic feature; you should use it in place of all loops that contain DML statements performing row-by-row processing. You will generally see performance improvements of at least an order of magnitude.
If you are not familiar with FORALL, make it a priority to
|
 |
|
|
Read More...
|
|
|
The Subtleties of Programming |
|
StevenFeuersteinTW
|
Monday, November 16, 2009 8:54 AM
|
|
|
|
I recently published the following puzzle in the ToadWorld newsletter:
Which of the following queries return the names of programs (without duplication) defined in the currently connected schema whose source contains a call to DBMS_OUTPUT.PUT_LINE (assume that this program name does not appear inside ...
|
 |
|
|
Read More...
|
|
|
The Most Important Language to Learn |
|
StevenFeuersteinTW
|
Monday, November 02, 2009 6:54 AM
|
|
|
|
I was recently in Germany, and did an interview with Erik Franz of database|pro. One of the questions he asked me was: "Which programming language would you recommend a college student learn to give them the strongest chance at a good job upon graduation?"
I would have loved to be able to answer: "Learn PL/SQL!
|
 |
|
|
Read More...
|
|
|
An Amazing Visit to Mexico City |
|
StevenFeuersteinTW
|
Friday, October 23, 2009 5:38 AM
|
|
|
|
As I write this, I am flying back to Chicago now, 9 PM Oct 21, from Mexico City, after a very nice two day visit.
Quest Mexico asked me to come down to help celebrate the release of Toad Version 10
|
 |
|
|
Read More...
|
|
|
|
|
PL/SQL on DB2 9.7 ?! |
|
StevenFeuersteinTW
|
Wednesday, September 16, 2009 6:36 AM
|
|
|
Check out this video. IBM claims to now provide native support for PL/SQL programs, including support for many built-in packages, collections, etc. Wow! Lots more details here, but you will find below some& ...
|
 |
|
|
Read More...
|
|
|
Online Training for the New Economy |
|
StevenFeuersteinTW
|
Tuesday, September 08, 2009 11:23 AM
|
|
|
|
When the going gets tough and budgets get tight, money for training is often cut first. You still, however, need to learn how to best leverage the PL/SQL language and write high quality code. To help you, Quest is offering a three-part, webcast training series that I will be teaching. Each session consists of two hours of in-depth coverage of a specific functionality area or best practice.
|
 |
|
|
Read More...
|
|
|
Oracle Database 11g Release 2 Has Arrived! |
|
StevenFeuersteinTW
|
Friday, September 04, 2009 3:25 PM
|
|
|
|
What a big relief....I was in the beta program, checking out the new features of PL/SQL in this latest release of the Oracle database. That's quite a privilege, but also a burden; Oracle is very severe about not wanting us to talk about upcoming features before they officially release the product to their adoring public.
That's toug ...
|
 |
|
|
Read More...
|
|
|
Making Change Happen |
|
StevenFeuersteinTW
|
Saturday, August 22, 2009 5:18 PM
|
|
|
|
[ It is very likely that if you are reading this you are a developer, but this is really geared towards software managers. So feel free to copy and paste into a Word doc and pass it along to your manager or team lead! ]
I very often give trainings and presentations on the topic of PL/SQL best practices. I offer lots of ideas for writing code that is eas ...
|
 |
|
|
Read More...
|
|
|
Watch Out for Data Caching! |
|
StevenFeuersteinTW
|
Monday, August 03, 2009 11:31 AM
|
|
|
|
I just fixed a bug in Quest Code Tester for Oracle, and I thought I would share my experience with you.
The bug was reported by our most excellent QA tester, Danny Pham. He is not only good at going through the defined test cases to verify correct behavior. He also takes devilish delight in trying all sorts of "crazy" stuff to see what happens.
So Danny encountere ...
|
 |
|
|
Read More...
|
|
|
Must Know Features of PL/SQL |
|
StevenFeuersteinTW
|
Wednesday, July 22, 2009 7:50 AM
|
|
|
|
I spend way too much of my life on airplanes zipping around to different places, doing presentations and trainings on PL/SQL. In the process, I meet many PL/SQL developers – and I continue to be surprised and disappointed at how many developers do not know about or at least do not seem to take advantage of very powerful and useful features of PL/SQL. So I have to decided to list below all those elements of PL/S ...
|
 |
|
|
Read More...
|
|
|
|
|
Naming Conventions and Coding Standards, the Feuerstein Way |
|
StevenFeuersteinTW
|
Thursday, May 28, 2009 10:32 AM
|
|
|
|
I am often asked about the naming conventions and coding standards that I use. My answer is usually a combination of muttering and vague statements and hand-waving.
That's because I have a confession: I don't have a single naming conventions and coding standards document that I use. Why not? Because I am a software developer! That is, I feel (well, I &l ...
|
 |
|
|
Read More...
|
|
|
A Classic Error in My Monthly Puzzle! |
|
StevenFeuersteinTW
|
Monday, April 27, 2009 8:47 AM
|
|
|
Every month, a Toad World newsletter goes out to thousands of Toad users and it includes a monthly puzzle that I write. Last month's puzzle went like this:
Which of the following blocks does not contain an infinite loop?
 |
|
|
Read More...
|
|
|
An interview with Steven Feuerstein |
|
StevenFeuersteinTW
|
Wednesday, April 22, 2009 6:06 PM
|
|
|
In case you simply can't get enough of Steven Feuerstein (no, I don't generally talk about my self in the third person or in the royal "we"), I invite you to check out this interview. I had an awful lot of fun answering the questions, and you might be entertained reading them.
|
 |
|
|
|
|
|
A handy string parsing utility - extended |
|
StevenFeuersteinTW
|
Monday, April 13, 2009 9:57 AM
|
|
|
|
It's truly one of the oddities of the PL/SQL language that it does not offer a delimited string parsing program. The closest we can get is DBMS_UTILITY.COMMA_TO_TABLE, and that is sadly deficient (it only parses comma-delimited strings and each item between the commas must be a valid PL/SQL identifier).
So I built one myself (the parse package) and put ...
|
 |
|
|
Read More...
|
|
|
Run an OS command from within PL/SQL |
|
StevenFeuersteinTW
|
Friday, March 27, 2009 6:14 AM
|
|
|
Developers are hard people to satisfy. Oracle gives us this incredibly robust, powerful and easy to use database programming language – and all we can do is complain about what it doesn't do for us.
Well, that's reality for you: PL/SQL is powerful and robust and easy to use, but also very narrowly focused. So if you want it to do something outside of its area ...
|
 |
|
|
Read More...
|
|
|
|
|
Automatic refactoring in PL/SQL tools – Part 1 |
|
StevenFeuersteinTW
|
Tuesday, December 09, 2008 12:23 PM
|
|
|
|
I have long been attracted to the idea and process of refactoring (explained below). It is now very exciting to see that automated refactoring features are working their way into tools for PL/SQL development. I will analyze these features over the next few entries in my ToadWorld blog, starting with SQL Develop ...
|
 |
|
|
Read More...
|
|
|
Congratulations to the newest Oracle Magazine PL/SQL Developer of the Year! |
|
StevenFeuersteinTW
|
Monday, November 03, 2008 8:03 AM
|
|
|
|
As I travel certain parts of the globe doing presentations on PL/SQL, I meet many extremely talented PL/SQL programmers – people who meet the most complex challenges you can imagine with a deft combination of intense creativity, hard work, and of course Oracle PL/SQL.
Oracle Magazine names only one as the PL/SQL Developer of the Year at each Oracle Open World, and this year the award was g ...
|
 |
|
|
Read More...
|
|
|
Play games to become a better developer! |
|
StevenFeuersteinTW
|
Tuesday, October 28, 2008 9:23 AM
|
|
|
|
Part 2: The Game of Mastermind
Software development is one heck of a serious job. It turns out, however, that there are several games you can play to improve the quality of code you write. This is the second of two blog entries that introduce you to two of my favorite brain development and training games:
 |
|
|
Read More...
|
|
|
Play games to become a better developer! |
|
StevenFeuersteinTW
|
Monday, October 20, 2008 7:01 AM
|
|
|
|
Part 1: The Game of Set
Software development is one heck of a serious job. It turns out, however, that there are several games you can play to improve the quality of code you write. This is the first of two blog entries that introduce you to two of my favorite brain development and training games: Set and Mastermin ...
|
 |
|
|
Read More...
|
|
|
Doing SQL in PL/SQL: key resource from Bryn Llewellyn |
|
StevenFeuersteinTW
|
Wednesday, October 08, 2008 10:09 AM
|
|
|
|
One of the highlights of Oracle Open World 2008 for me was the presentation by Bryn Llewellyn (PL/SQL Product Manager) on “Doing SQL in PL/SQL.”
Bryn surely has the most thorough and clear understanding of the PL/SQL language of anyone I have met (definitely including me).
His talk was detailed ...
|
 |
|
|
Read More...
|
|
|
For loops or While loops to scan collections? |
|
StevenFeuersteinTW
|
Monday, September 22, 2008 9:21 AM
|
|
|
|
I have generally recommended in the past that whenever you are writing code to iterate through the elements of a collection, you should use a while loop, combined with the FIRST-NEXT or LAST-PRIOR collection methods.
The key advantage of this approach is that the code will not raise a NO_DATA_FOUND exception if your collection is sparse (there is an index value be ...
|
 |
|
|
Read More...
|
|
|
|
Oracle Open World Presentations |
|
StevenFeuersteinTW
|
Tuesday, July 22, 2008 8:41 AM
|
|
|
|
Hey folks,
For anyone attending Oracle Open World this year, here is my schedule of presentations:
Session ID: S300184
Session Title: Weird PL/SQL
Track: Oracle Develop: Database
Room: Golden Gate C3
Date: 2008-09-21
Start Time: 15:45
|
 |
|
|
Read More...
|
|
|
Always Bulk Collect |
|
StevenFeuersteinTW
|
Monday, June 23, 2008 7:34 AM
|
|
|
|
You learn something new every day, right? Well, I certainly do (more or less). Even about PL/SQL, about which I am sure many people think I already know everything. Far from it.
In fact, I learned just last week from the PL/SQL Product Manager, Bryn Llewellyn, that his recommendation regarding cursor FOR loops and bulk collect is different fro ...
|
 |
|
|
Read More...
|
|
|
How to Run an OS Command from PL/SQL |
|
StevenFeuersteinTW
|
Wednesday, June 04, 2008 7:11 AM
|
|
|
|
Oracle doesn't make it terribly easy to run operating system commands from within a PL/SQL block. I suppose that's understandable, given that PL/SQL is an embedded database-oriented language. Still, developers do ask me on a regular basis about how they can do this.
As I understand it, there are basically three ways to do this:
- Invoke a Java method from wit ...
|
 |
|
|
Read More...
|
|
|
Testing and refreshing data from production |
|
StevenFeuersteinTW
|
Thursday, April 17, 2008 9:21 AM
|
|
|
|
As many of my readers likely know by now, I have been working for the past several years on the Quest Code Tester development effort.
Code Tester is the most powerful PL/SQL test automation tool available. You describe the expected behavior of your programs and Code Tester generates your test code, which can then be run from the UI or via a script. With Code Teste ...
|
 |
|
|
Read More...
|
|
|
Auto-formatting of templates for Toad |
|
StevenFeuersteinTW
|
Thursday, April 10, 2008 9:14 AM
|
|
|
|
A few months ago, I posted on this blog an explanation of how to use Toad's Code Templates to standardize development and improve productivity. I included an XML document that contains over 20 templates that I thought you might find useful. I also asked my readers to produce XML transformations so that the XML document could be "output" in the format that Toad recognizes (and SQL Navigator as ...
|
 |
|
|
Read More...
|
|
|
Weird PL/SQL |
|
StevenFeuersteinTW
|
Monday, March 17, 2008 12:57 PM
|
|
|
|
Collaborate08, annual conference of the International Oracle User Group, and several other national and international user groups, will be held in Denver this year, from April 13th to the 16th. I am going to present three papers, including (for the first time) Weird PL/SQL. I thought you might enjoy reading about some of the weirdnesses of PL/S ...
|
 |
|
|
Read More...
|
|
|
Just how popular is PL/SQL? |
|
StevenFeuersteinTW
|
Monday, February 04, 2008 11:56 AM
|
|
|
|
Just how popular is PL/SQL?
And how many PL/SQL developers are there "out there"?
These are surprisingly hard questions to answer. Officially and even unofficially, Oracle Corporation's point people on PL/S ...
|
 |
|
|
Read More...
|
|
|
|
Single quotes and CLOBs in 10.2.0.3 |
|
StevenFeuersteinTW
|
Wednesday, December 19, 2007 5:41 PM
|
|
|
|
I usually write about best practice principles and general issues.
Today I thought I would share a bit of my pain with you on a very specific topic: single quotes and CLOBs, and specifically on O ...
|
 |
|
|
Read More...
|
|
|
Error Management functions and features for PL/SQL Developers |
|
StevenFeuersteinTW
|
Tuesday, December 04, 2007 8:41 PM
|
|
|
|
Winter is descending on Chicago; we had our first snow (flurries, really) on Thanksgiving Day, and the sun is weak. For many, this is a depressing time – and I mean that the lack of that and cold actually does make people feel depressed. Per ...
|
 |
|
|
Read More...
|
|
|
My Favorite Templates – in one convenient file |
|
StevenFeuersteinTW
|
Wednesday, November 28, 2007 1:24 PM
|
|
|
|
Would you like to increase productivity, improve code quality, and ensure that standards are being followed? Of course you would! And one of the best ways to do that is to rely heavily on Toad's Code Templates (similar functionality exists in SQL Navigator as well).
|
 |
|
|
Read More...
|
|
|
Catching up with me at Oracle OpenWorld |
|
StevenFeuersteinTW
|
Sunday, November 11, 2007 11:13 AM
|
|
|
|
Sorry about the late posting, but if you are interested in attending my presentations, here's the info:
Session ID: S290723
Session Title: Break Your Addiction to ...
|
 |
|
|
Read More...
|
|
|
|
|
|
In what version did Oracle add that feature? |
|
StevenFeuersteinTW
|
Friday, September 14, 2007 11:08 AM
|
|
|
|
I get this question a lot. I am teaching a class and a student asks: "When did Oracle add autonomous transactions?" Or the INDICES of clause. Or – who knows what?
Seeing as I am totally obses ...
|
 |
|
|
Read More...
|
|
|
Quseful #7: Kill those infinite loops! |
|
StevenFeuersteinTW
|
Wednesday, August 29, 2007 12:42 PM
|
|
|
|
I don't know about you, but I sometimes write code that (inadvertently, not on purpose) contains an infinite loop. So I run my program and Toad goes off into never-never land, with Oracle chewing up CPU cycles so intently that it is hard to connect as SYS and kill the session.
...
|
 |
|
|
Read More...
|
|
|
|
Quseful #6: Generate collections of random values |
|
StevenFeuersteinTW
|
Friday, August 17, 2007 9:27 AM
|
|
|
|
You will find in this Quseful a package that will generate/return collections of random values of strings, numbers and dates. It also contains a "self-test" random_verifier procedure that you can run to verify "at a glance" that the values being generated seem
|
 |
|
|
Read More...
|
|
|
 |
 |
|
 |
|
 |
|
|