|
|
Blogs
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 his PL/SQL Obsession:
|
|
By StevenFeuersteinTW (User) on
Wednesday, September 15, 2010 12:37 PM
Conditional compilation is a feature of PL/SQL introduced in Oracle Database 10g that allows you to specify "meta" commands in PL/SQL that tell the compiler to include/exclude certain lines of code for compilation - and even raise a compilation error.
|
By StevenFeuersteinTW (User) on
Tuesday, August 17, 2010 7:33 AM
I recently received this question from Syed:
"How does Oracle store the data for associative arrays and nested tables internally? Which type of collection is better for processing a huge volume of data without putting back into the database?"
First, regarding the question of "internal" storage: I have no idea how Oracle manages these structures. I expect that the PL/SQL development team uses some kind of linked list implementation. I also suppose that I could ask Bryn Llewellyn (the PL/SQL Product Manager) about this, but I am certain his answers will be: ...
|
By StevenFeuersteinTW (User) on
Tuesday, July 20, 2010 6:51 AM
On 15 July 2010, 32 developers participated in the first-ever PL/SQL Challenge championship playoff. This playoff (consisting of ten questions to be answered in 15 minutes) was the culmination of a three-month competition in which PL/SQL developers from around the world tested their knowledge of PL/SQL against one another through daily quizzes.
|
By StevenFeuersteinTW (User) on
Wednesday, July 14, 2010 1:02 PM
Steven explains the difference between RAISE_APPLICATION_ERROR and RAISE and why you would use one vs. the other.
|
By StevenFeuersteinTW (User) on
Monday, June 28, 2010 6:18 AM
I recently needed to move the contents of clobs and collections to and from files, and also write simple reporting routines. So I ended up creating the following and uploading them to my demo.zip download:
export_clob.sql - move the contents of a clob to the specified file or to system output, if no file is specified.
file_to_clob.sql - load the contents...
|
By StevenFeuersteinTW (User) on
Friday, June 11, 2010 1:18 PM
Way back when Oracle10g was released, Oracle added compile-time warnings to the PL/SQL compiler.
When you enabled warnings in your session (or for a specific program), then at the time of compilation, Oracle will check to see if it can identify ways in which you might be able to improve the quality or performance of your code.
You can read more about the compile time warnings feature here. ...
|
By StevenFeuersteinTW (User) on
Tuesday, June 01, 2010 12:29 PM
I recently received an email from Syed asking this very question as follows:
"Could you please let me know why DDL statements are not allowed [natively] in PLSQL? I read somewhere that the reason is that DDL statements will cause objects to be invalidated and then require recompilation. As all objects are already in a compiled [VALID] state, compiling again will be an overhead. But when we execute DDL statements [with...
|
By StevenFeuersteinTW (User) on
Monday, May 10, 2010 6:09 AM
I recently received this question from a PL/SQL developer:
"What is the maximum size of a PL/SQL procedure?"
The answer is interesting: there is not a maximum size, per se. Instead, the limitation has to do with the maximum number of DIANA nodes your program generates in the compilation process.
DIANA is an intermediate language produced and used by the compiler. DIANA standards for “Descriptive Intermediate Attributed Notation for Ada" - and reminds us that PL/SQL is based on Ada, a programming language originally developed for the U.S. Department of Defense. ...
|
By StevenFeuersteinTW (User) on
Wednesday, May 05, 2010 6:17 AM
I received yesterday this email from a PL/SQL developer:
I am stumped. My PL/SQL code does not seem to be handling dates properly. Here is a block of code I extracted from my actual program to demonstrate the problem:
DECLARE global_end_date DATE := '04-May-2010'; global_beg_date DATE := '01-May-2010';BEGIN IF TRUNC (SYSDATE) > TO_DATE (global_end_date, 'DD-MON-YYYY') THEN DBMS_OUTPUT.put_line...
|
By StevenFeuersteinTW (User) on
Monday, April 26, 2010 12:49 PM
|
By StevenFeuersteinTW (User) on
Thursday, April 22, 2010 7:44 AM
I've just returned from Collaborate 10, the international Oracle conference organized through a collaboration (hence the name!) between IOUG, Quest (the user group) and OAUG.
It was held at the Mandalay Bay Convention Center in Las Vegas. Now, I must admit, I really don't like Las Vegas (the pretend parts) very much at all. The real parts, like the Red Rock Canyon National Conservation Area,...
|
By StevenFeuersteinTW (User) on
Tuesday, April 13, 2010 5:54 AM
"Invoker rights, what's that?" you may be asking.
That wouldn't surprise me, greatly, though one might consider it a bit odd because the invoker rights feature of PL/SQL was added in Oracle8i - many years ago!
So I will first offer a brief overview of invoker rights, why you'd use it, how you use it. Then I will introduce one of the major challenges with invoker rights. Finally, I offer a utility that can help...
|
By StevenFeuersteinTW (User) on
Monday, March 29, 2010 6:01 AM
I have certainly learned a lot over the years from other authors, and I thought I would share with you my fairly eclectic collection of favorite books (those that have informed my programming, in any case).
|
By StevenFeuersteinTW (User) on
Thursday, March 18, 2010 8:14 AM
The PL/SQL Challenge is a daily quiz that culminates every three months in a championship tournament to determine the most knowledgeable PL/SQL developers in the world. You could win cash, O'Reilly Media books and other goodies - but only if you play!
|
By StevenFeuersteinTW (User) on
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.
|
By StevenFeuersteinTW (User) on
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 equality and inequality, and specify the values of attributes through a grid.
Default value support You now...
|
By StevenFeuersteinTW (User) on
Tuesday, February 09, 2010 12:19 PM
Steven discusses generic retrieval/change challenges when it comes to PL/SQL records.
|
By StevenFeuersteinTW (User) on
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 get familiar. You can start with my brand new 5th edition of Oracle PL/SQL Programming,...
|
By StevenFeuersteinTW (User) on
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 comments)?
A. SELECT name FROM USER_DEPENDENCIES
WHERE referenced_name = 'DBMS_OUTPUT.PUT_LINE'
B. ...
|
By StevenFeuersteinTW (User) on
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!
|
By StevenFeuersteinTW (User) on
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. I said "OK."
And, wow, they did a really fantastic job of making me feel appreciated. Besides...
|
By StevenFeuersteinTW (User) on
Thursday, October 15, 2009 6:42 AM
Steven discusses how LTRIM works and an alternative solution for a user's problem.
|
By StevenFeuersteinTW (User) on
Monday, October 12, 2009 7:28 AM
A little known, but very handy feature of PL/SQL is the ability to apply set operators, like union, intersect and minus, to nested tables.
|
By StevenFeuersteinTW (User) on
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
 ...
|
By StevenFeuersteinTW (User) on
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.
The cost is far less...
|
By StevenFeuersteinTW (User) on
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 tough on me, because I have a hard time keeping my mouth shut about anything, especially...
|
By StevenFeuersteinTW (User) on
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 easier to read and maintain, runs more efficiently, can be...
|
By StevenFeuersteinTW (User) on
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 encountered this error after he set up a test case with three outcomes, all built on cursor variable expression tests (something that is very unlikely for a customer to have done): ...
|
By StevenFeuersteinTW (User) on
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/SQL that I consider...
|
By StevenFeuersteinTW (User) on
Wednesday, July 15, 2009 6:10 AM
Steven proposes a solution to a customer's question about using a 2 dimensional array in PL/SQL.
|
By StevenFeuersteinTW (User) on
Wednesday, June 10, 2009 11:19 AM
I was on the phone with a Quest Code Tester user the other day and he asked me if I was working on the next edition of my original "magnum opus", Oracle PL/SQL Programming, which would include Oracle11g features.
I cannot describe to you how good it felt to say: "No, I'm not working on it. I'm finished working on it."
In fact, just...
|
By StevenFeuersteinTW (User) on
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 am) very busy, overwhelmed by deadlines. I don't feel like...
|
By StevenFeuersteinTW (User) on
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?
A.
DECLARE
l_line VARCHAR2(32767);
l_file UTL_FILE.file_type :=
UTL_FILE.fopen ('C:\temp', 'my_file.txt', 'R');
BEGIN
LOOP
UTL_FILE.get_line (l_file, l_line);
END LOOP;...
|
By StevenFeuersteinTW (User) on
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.
|
By StevenFeuersteinTW (User) on
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 it in the demo.zip file...
|
By StevenFeuersteinTW (User) on
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 of expertise, sometimes you have to jump through a few more hoops than you'd like. ...
|
By StevenFeuersteinTW (User) on
Monday, March 09, 2009 8:18 AM
In part 1 of this series, I reviewed the automated refactoring features in SQL Developer. In part 2, I checked out PL/SQL Developer's refactoring features. Now, it's time for Toad.
Differently from both PL/SQL Developer and SQL Developer, Toad does not have...
|
By StevenFeuersteinTW (User) on
Tuesday, January 06, 2009 9:30 AM
In part 1 of this series, I reviewed the automated refactoring features in SQL Developer. Now I will check out PL/SQL Developer (version 7.1.5)'s refactoring features.
To access these features, I highlight some code in a procedure edit window and then choose Refactoring from the right click menu. I see these options:
I...
|
By StevenFeuersteinTW (User) on
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 Developer and then moving on to PL/SQL Developer, and finishing up with SQL Navigator and Toad. ...
|
By StevenFeuersteinTW (User) on
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 given to Alex De Vergori of Betfair. Oracle Magazine writes: ...
|
By StevenFeuersteinTW (User) on
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: Set and Mastermind. ...
|
By StevenFeuersteinTW (User) on
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 Mastermind.
Play either (preferably both) of these games, and you will write better software. ...
|
By StevenFeuersteinTW (User) on
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 and precise (and maybe just a little bit overwhelming. He needed twice the time allotted) on this most important topic. ...
|
By StevenFeuersteinTW (User) on
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 between FIRST and LAST that is not defined). And if your collection is empty, the loop will not execute at all, whereas with a for loop, an empty collection could cause a VALUE_ERROR exception if you are not careful....
|
By StevenFeuersteinTW (User) on
Wednesday, August 27, 2008 3:55 PM
I have, for the past several years, focused heavily on designing and building an automated code testing tool for PL/SQL: Quest Code Tester for Oracle. One feature that is often requested as a part of code testing is analysis of code coverage, answering questions like:
When I run my program do I use 50% of the code? 75% of the code?
Are there chunks...
|
By StevenFeuersteinTW (User) on
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
Session ID: S300183
Session Title: Break Your Addiction to SQL!
Track: Oracle Develop: Database
Room: Salon 02
Date: 2008-09-22
Start Time: 13:00
...
|
By StevenFeuersteinTW (User) on
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 from mine – and for a very good reason.
Several years ago, he informed...
|
By StevenFeuersteinTW (User) on
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 within a PL/SQL wrapper
Call a C program...
|
By StevenFeuersteinTW (User) on
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 Tester, you can build comprehensive regression tests and...
|
By StevenFeuersteinTW (User) on
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 well).
I am happy...
|
By StevenFeuersteinTW (User) on
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/SQL in my ToadWorld blog, so here's an excerpt from the beginning of my whitepaper: ...
|
By StevenFeuersteinTW (User) on
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/SQL do not have any idea (or refuse to say) how many PL/SQL developers there are.
I take the approach of doing some rough extrapolations from numbers of books I and other PL/SQL developers have...
|
By StevenFeuersteinTW (User) on
Monday, January 07, 2008 2:46 PM
You will find below an excerpt from my latest publication: the 2nd edition of Oracle PL/SQL Best Practices. This edition is a complete rewrite of the 1st edition. I decided that since software is still, for the most part, written by humans, I would create a cast of characters who write the software I reference and critique in this book.
They...
|
By StevenFeuersteinTW (User) on
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 Oracle 10.2.0.3.
I figure that I lost an hour or two of my life to this one, and would like to pass on the warning to you all.
In Quest Code Tester, we store in put and expected values that you provide in your test...
|
By StevenFeuersteinTW (User) on
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. Perhaps that is why I found myself thinking negatively – that is, about exceptions in PL/SQL.
So I thought I would share with you some of the features and functions available in PL/SQL, especially...
|
By StevenFeuersteinTW (User) on
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).
Code Templates are chunks of code that you can assign a name and description. You then use the name to quickly copy the associated code into your editor....
|
By StevenFeuersteinTW (User) on
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 SQL!
Track: Database
Room: Grand Ballroom A
Date: 2007-11-12
Start Time: 12:30
Session ID: S290725
Session Title: Collect Yourself: Optimize PL/SQL Code with Collections
Track: Database
Room: Yosemite Room B
Date: 2007-11-12
Start Time:...
|
By StevenFeuersteinTW (User) on
Thursday, October 18, 2007 8:50 AM
All files referenced in document available from: www.oracleplsqlprogramming.com/downloads/demo.zip.
Introduction
Very, very few of us write perfect programs the first time, or the second time, or…. You get the idea. Our code is never perfect and can always be improved. Martin Fowler developed a technique he calls "refactoring," and it has become quite popular in the world of Java. Here is Mr. Fowler's description of refactoring: ...
|
By StevenFeuersteinTW (User) on
Wednesday, September 26, 2007 10:23 AM
Use templates to accelerate high quality coding.
When you open a new edit window in Toad, it looks like this:

Well, of course it does....it's an empty, new edit widow!
That's fine, but suppose I now need to create a new package for my application. Sadly, what many of us do is start typing:
 ...
|
By StevenFeuersteinTW (User) on
Thursday, September 20, 2007 10:37 AM
What's the point?
This utility will make it easy for you to read in the contents of DDL statements (like CREATE OR REPLACE PACKAGE) and execute them within Oracle.
Show me the code!
It's not a terribly long program, so I will include it right in this posting:
CREATE OR REPLACE PROCEDURE exec_ddl_from_file (
dir_in IN VARCHAR2
, file_in IN VARCHAR2
)
AUTHID CURRENT_USER ...
|
By StevenFeuersteinTW (User) on
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 obsessed with PL/SQL, I usually actually remember the answer to such questions.
Occasionally, however, I do not. And of course I cannot always be there for you to answer such a question when you have it.
So I thought I would pass along a tip – a way to quickly determine the version in which a feature was introduced to Oracle. ...
|
By StevenFeuersteinTW (User) on
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.
I hate that, don't you?
Now, there are two ways to address this problem:
1. Don't write code that contains infinite loops....
|
By StevenFeuersteinTW (User) on
Wednesday, August 22, 2007 7:41 AM
Kudos to Alex Nuijten for bringing this gem to light, he wrote in his latest AMIS blog entry that:
"If you are a regular user of the FORALL statement, you are probably also familiar with this message:
PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records
While I was playing around on...
|
By StevenFeuersteinTW (User) on
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 random. As a bonus, I include the pick_winners_randomly procedure, which I use in my seminars to pick the winners in raffles for my books and other goodies.
I wrote...
|
By StevenFeuersteinTW (User) on
Monday, August 06, 2007 2:01 PM
I offer in this Quseful (Quick and Useful) a package that you can use to determine if a string contains a valid integer, number, binary_float or binary_double (note: if you are not running Oracle 10g, you will need to comment out the binary_* versions in this package). It is based on code I wrote about back in 1997 (available here, along with the article...
|
By StevenFeuersteinTW (User) on
Wednesday, July 11, 2007 11:04 AM
I offer in this Quseful (Quick and Useful) a package that you can use to dynamically retrieve the value of almost any column from any table. I created this package as a "helper" utility for Quest® Code Tester users. Here's the problem that I was solving with this package:
We added support for automated testing of XML documents in Quest Code Tester 1.6, which will be released in a month or so (a very solid beta is...
|
By StevenFeuersteinTW (User) on
Friday, June 22, 2007 11:19 AM
That's me. A hypocritical programmer. And I am here to admit it, to make a confession.
Hypocrisy has got to be one of the most infuriating traits of human beings.
Definition:
"A pretense of having a virtuous character, moral or religious beliefs or principles, etc., that one does not really possess." http://dictionary.reference.com/browse/hypocrisy...
|
By StevenFeuersteinTW (User) on
Tuesday, June 05, 2007 6:16 AM
Qusefuls #1 and #2 were published on Steven Feuerstein's personal blog at feuerthoughts.blogspot.com.
About Qusefuls
A Quseful is a Quick and Useful (as opposed to Quick and Dirty) tip on now to write programs in the Oracle PL/SQL language more effectively. I originally published Qusefuls on my blog (feuerthoughts.blogspot.com), but am now switching the "home" for Qusefuls to my ToadWorld blog. Each Quseful contains...
|
By StevenFeuersteinTW (User) on
Wednesday, May 09, 2007 11:24 AM
It is Wednesday, May 09, 2007 and I am sitting in the Admiral's Club at the Buenos Aires airport. I just finished two days in this lovely city. My first day was spent enjoying the chilly, but very sunny afternoon, walking for four hours around the city. It is a busy, busy place with many buses throwing way too much gritty exhaust into the air (hey, but they are Mercedes Benz buses! I think that Americans would be generally...
|
By StevenFeuersteinTW (User) on
Thursday, April 19, 2007 9:16 AM
I am visiting this, well, very artificial paradise dropped into the middle of a desert, so as to participate in Collaborate 07. It's been an interesting and fun several days. I have a room on the 26th floor of the Mandalay Bay hotel, so I have a fantastic view looking out over the wave pool, lazy river and assorted pools between the hotel and the convention center. Better yet, I can see mountains right there on the horizon....
|
By StevenFeuersteinTW (User) on
Thursday, March 29, 2007 9:37 AM
I rediscovered the joy of writing to myself a week ago, and I also was reminded of the danger of coding in isolation (that is, working by oneself).
I recently tangled with my implementation of column set management in Quest Code Tester.
"Column set management," you wonder, "what's that?"
In this amazing, automated code testing tool for PL/SQL, you can at a high level describe the tests you want Quest...
|
By StevenFeuersteinTW (User) on
Wednesday, March 14, 2007 9:54 AM
Some musings about the life of a programmer....
Two weeks ago, we held the second annual Oracle PL/SQL Programming conference (I talked about it in last week's blog on the Test-A-Thon). I gave the keynote speech on the first day. It was titled "Wake up and smell the methodologies". Generally, I urged PL/SQL programmers to take a look at the various methodologies out there, such as Extreme Programming, Structured Programming...
|
By StevenFeuersteinTW (User) on
Wednesday, March 07, 2007 11:46 AM
A couple months ago as ODTUG was working out the final details for the Oracle PL/SQL Programming 2007 conference I came up with an idea for a Test-A-Thon:
Contestants are handed a set of programs, and test cases for each of the programs. They must then (in the next hour) build test scripts for those programs that automatically verify whether or not the program works. Whoever gets furthest in building the test scripts...
|
By StevenFeuersteinTW (User) on
Friday, February 23, 2007 5:16 PM
Test your code! Debug your code! Trace your code! We all hear about how we should or at least could perform these activities with our programs. And all too often the terms and usages seem to blur, and be confused. In reality, these three activities – test, debug, trace – are all quite different in nature and serve different purposes.
This blog entry offers my perspective on how they differ. I hope you find it useful...
|
By StevenFeuersteinTW (User) on
Wednesday, February 14, 2007 2:09 PM
The Major Enhancements in the 1.5 Release
Of course, we spent lots of time just fixing bugs and making lots of small changes. But there were some very critical "big ticket" enhancements that were requested by users and prioritized for the commercial release.
The ToadWorld preview release, Quest Code Tester for Oracle 1.2.5.5, offered a Test Builder that is very powerful, but it is also a bit quirky and...
|
By StevenFeuersteinTW (User) on
Wednesday, February 07, 2007 11:26 AM
As I write these very words, we are preparing to release the commercial release of Quest Code Tester for Oracle 1.5.
I hope that you have already heard about this new testing tool. If not, I offer a quick intro/overview below.
I hope that you have already downloaded the special preview release (1.2.5.5) we made available at Oracle Open World in October 2006. If not, no problem....just wait a little bit and then download...
|
By StevenFeuersteinTW (User) on
Wednesday, January 31, 2007 12:07 PM
I recently spent two days training a group of about 30 developers and DBAs out east. As with any sizeable collection of technologists, the level of expertise and the years of experience varied greatly (and don't always go hand in hand!).
I was pleased to see that everyone seemed to get along well, there wasn't any great reluctance to ask questions (that is, admit ignorance), and several attendees didn't hesitate to challenge my ideas and suggest other ways of doing things. Just the way I like it! ...
|
By StevenFeuersteinTW (User) on
Wednesday, January 24, 2007 8:51 PM
Now, for sure, we need really good tools to help get the job done, but we also need to think about the workflow we follow to write our code. You will find my latest ideas about that below. From a methodological standpoint, it draws heavily on Test Driven Development.
I will be building out these ideas further throughout 2007, and also we are looking at ways at incorporating these ideas directly into...
|
By StevenFeuersteinTW (User) on
Tuesday, December 19, 2006 3:47 PM
I thought I would take a moment out of my busy Quest Code Tester development efforts (that is, heads-down coding, writing specifications, working with developers in Chicago, Columbus, St. Louis and Russia) to give thanks to Toad.
"Way back" in October (that's the way it feels, already), Quest released Toad 9. My initial reaction, probably like many other Toad users (and I do feel like I am quite the typical...
|
By StevenFeuersteinTW (User) on
Monday, December 04, 2006 10:30 PM
You probably don't give this a second thought, but sometimes the question rears its ugly and bewildering head in the code you are writing – precisely because Oracle itself provides multiple answers to the question, right from inside its own code base. Let's take a closer look.
When NO_DATA_FOUND is raised, the error message is:
ORA-1403: no data found
So...is that character between...
|
By StevenFeuersteinTW (User) on
Thursday, November 09, 2006 11:55 AM
When an exception is raised, one of the most important pieces of information a programmer would love to get hold of is the line of code that caused the exception to be raised. Before Oracle 10g came long, the only way to get this information was to allow the exception to go unhandled and then view the error stack. The following chain of program calls shows you what I mean.
CREATE OR REPLACE PROCEDURE my_procedure_1...
|
By StevenFeuersteinTW (User) on
Thursday, November 02, 2006 11:28 AM
All those big brain technoids always make such a big deal out of testing. Too many bugs in our software! Bugs cost money! Bugs make us look bad! Test your code before you give it to your users! Test your code before you write your code! Test your code before you learn how to write code! C'mon, I say, give us a break!
Here's the way I look at it: we could bust our buttons working extra special hard to get rid of lots...
|
By StevenFeuersteinTW (User) on
Monday, October 30, 2006 4:58 PM
Welcome to my Toad World blog! I will offer on this blog a wide variety of tips and incredibly deep and surprising insights on the Oracle PL/SQL language (the object of my obsessive personality for the last 10+ years). I look forward to your responses and critiques. That is: I hope you will engage with these ideas and feel perfectly comfortable with disagreeing with me, offering other, perhaps better, ideas, and in general...
|
|
|