Skip navigation.

Feed aggregator

The Templating Way

Jeff Kemp - Thu, 2010-07-29 18:00
Today, grasshopper, you will learn the Way of the Template. The Templating Way is the path by which complex output is produced in a harmonious fashion. The Templating Way does not cobble a string together from bits and pieces in linear fashion. htp.p('<HTML><HEAD><TITLE>'||:title ||'</TITLE></HEAD><BODY>' ||:body||'</BODY></HTML>'); The Templating Way separates the Template from the Substitutions; by this [...]

A fascinating SQL problem

Jeff Kemp - Thu, 2010-07-29 00:00
Can you solve this problem in SQL – i.e. without resorting to a procedural solution? SQL combine multiple identifiers to create a group id for duplicate records “I have a data extract with three different identifiers: A, B, C Each identifier may appear in more than one row, and each row may have one or [...]

Priority #1: Keep it simple

Jeff Kemp - Wed, 2010-07-28 03:00
Every place has a different way of assigning priority and/or severity to defect reports – some bigger places have many different ways (unfortunately). I’ve not been subjected to Prince2 training so here’s my take on this subject. I reckon, the simpler the scheme, the more likely it will be used consistently. Every defect should have [...]

Current Record Visual Attribute problem

Jeff Kemp - Mon, 2010-07-26 22:00
If you have a multi-record block, and you use the handy Current Record Visual Attribute (CRVA) to set, say, a different background colour on all the items in the currently selected record, you may have run into this problem. If you want to conditionally switch the visual attribute for certain items, at the item instance [...]

Forms Library: PKG_FORM

Jeff Kemp - Sun, 2010-07-25 22:00
This is just a post to document a standard library that I like to create in Oracle Forms, if equivalents are not already available. Suggestions or critiques are welcome. “No warranty is express or implied about the suitability of this code for any purpose.” Specification PACKAGE PKG_FORM IS PROCEDURE centre_window (windown IN VARCHAR2); PROCEDURE check_record_is_saved; [...]

Forms Library: PKG_ITEM

Jeff Kemp - Thu, 2010-07-22 22:00
This is just a post to document a standard library that I like to create in Oracle Forms, if equivalents are not already available. Suggestions or critiques are welcome. “No warranty is express or implied about the suitability of this code for any purpose.” Specification The main point of this package is to (a) easily [...]

Negative, Captain

Jeff Kemp - Wed, 2010-07-21 19:13
Seen in the wild: ... WHERE substr(amount,0, 1) != '-' If you wanted to query a table of monetary transactions for any refunds (i.e. where the transaction amount is negative), how would you do it? Perhaps you’d think about avoiding problems that might occur if the default number format were to change, hm? (before you say [...]

I&#8217;m off to InSync10

Jeff Kemp - Mon, 2010-07-12 18:00
Perhaps you were introduced to Apex in a similar way to me. When I started using Apex, I was pleased to see a good selection of simple themes and templates I could use straight away. There was no need to worry about creating a consistent look-and-feel across my applications, I could dive right into building [...]

If at first you don&#8217;t succeed&#8230; it&#8217;s impossible.

Jeff Kemp - Mon, 2010-07-12 00:00
How many times have you tried something, got either an error or unexpected results, and decided what you were trying to do was not possible? Have you later on discovered someone quietly doing the impossible? I think this phenomenon is a form of the “correlation-implies-causation” fallacy. Unfortunately, this seems to happen too often, if the [...]

Quick Draw Fail

Jeff Kemp - Tue, 2010-07-06 19:00
It rarely pays to answer too quickly. Yesterday’s question at the PL/SQL Challenge was about aliases for expressions in cursor-based record types. DECLARE CURSOR profitable_internet_stocks IS SELECT SUM (share_price) FROM nasdaq_listings WHERE profits > 0 AND sector = 'INTERNET'; few_and_far_in_between profitable_internet_stocks%ROWTYPE; BEGIN OPEN profitable_internet_stocks; FETCH profitable_internet_stocks INTO few_and_far_in_between; CLOSE profitable_internet_stocks; /*[display_statement]*/ END; The question asked [...]

Apex Browser Requirement

Jeff Kemp - Mon, 2010-06-28 17:30
Whereas Apex 3.2.1 (and earlier, I think) required one of: Microsoft Internet Explorer 6.0 or later version Firefox 1.0 or later Apex 4.0 requires: Microsoft Internet Explorer 7.0 or later version Mozilla Firefox 3.5 or later version Google Chrome 4.0 or later version Apple Safari 4.0 or later version While they’ve dropped support for IE [...]

Unit Test != Requirements

Jeff Kemp - Fri, 2010-06-25 03:00
Are one or more usage examples enough to specify the requirements for something? For example: rtrim('123000', '0'); would return '123' No, as can be seen here: Oracle 8, SQL: RTRIM for string manipulation is not working as expected (Stackoverflow) When I read that question I thought of TDD (Test Driven Development), something I think I [...]

Querying for Contiguous Series

Jeff Kemp - Thu, 2010-06-24 22:30
A deceptively simple question: How to select the first continous group of rows using Oracle SQL (Stackoverflow) The solution given by Malgrat works nicely. He generates a “gap” column which detects changes in the data, then uses a running total to restrict the results to the first “group”. I haven’t come up with a more [...]


Jeff Kemp - Tue, 2010-06-22 22:30
I just wanted to bring attention to some very interesting discussion (that’s been going on for years now) regarding Table APIs (TAPI) versus Transactional APIs (XAPI). Some very nice answers, as well as a bit of controversy “Understanding the differences between Table and Transaction API’s” (Stackoverflow) “Considering SQL as a Service” (AskTom) Business Logic APIs [...]

My favourite 11g thing

Jeff Kemp - Tue, 2010-06-22 03:00
For too long I’ve muddled my way through using the built-in “explain plan” feature of the IDE-that-shall-remain-nameless provided by the client; but now that they’ve successfully upgraded from 9i to 11g, I’m now in a much better place. No longer will I wonder which table each step in a plan refers to, or what filters [...]


Jeff Kemp - Sun, 2010-06-20 22:30
I’ve enjoyed reading and participating in StackOverflow for over a year now. With the introduction of Area51, there is now the possibility of starting a new Q&A site for all things Oracle – as pointed out by Rob Van Wijk and Gary Myers. Sure there are other fora such as OTN, but they don’t have the [...]

Single-Point-of-Definition by Example

Jeff Kemp - Thu, 2010-06-10 23:00
Steven Feuerstein lists seven excellent “Golden Rules” in his presentation (via Eddie Awad) and says “Don’t repeat anything. Aim for a Single Point of Definition for every aspect of your application – formulas, business rules, magic values, SQL statements.” giving the following code as exhibit A: (source) I’m guessing in his presentation he spoke about various [...]

Another way to learn something new every day

Jeff Kemp - Sun, 2010-05-30 22:30
My morning routine for the last few weeks has had a small addition – just a few minutes to log on The PL/SQL Challenge at 8am (WST) and answer a quiz question. This is a great way to test the depth and breadth of your knowledge of Oracle PL/SQL. Whether you’re a beginner in the [...]

Enhanced Change Management Functionality to the IR/ISO Process

Bryan Thompson - Sat, 2010-05-29 16:41
In 12.1 and 12.1.2, Oracle has introduced long awaited improvements to the Internal Requisition/Internal Order (IR/ISO) process...

Two sides of the same fence?

Jeff Kemp - Tue, 2010-05-25 22:00
In my daily reading these two articles came fairly close together, and I have a strong feeling they are describing exactly the same project. * From one side of the fence: A total rewrite: costly, time-consuming, but worth it? “Our CMS was developed using Active Server Pages, and consisted of around 80,000 lines of VBScript [...]