Jeff Kemp

Add a "Who's Online Now" box to your Apex app

Thu, 2008-05-08 15:10
Something to file under "pointless fun"... Allow your users to feel like they're part of a community by letting them know who else is using the app at the same time. Open Apex Application Builder, and open the page you want to add this to. Click the Create Region icon. Choose Report, then SQL Report. Enter a title, e.g. "Who's Online Now". Click Next. Copy the following for the SQL Query (Jeffrey Kemphttp://www.blogger.com/profile/08514743151986599227noreply@blogger.com

WITH With an IN; or, A Reason to Refactor

Fri, 2008-05-02 03:23
A work colleague needed to make a change to a report and came up against a brick wall. He knew what he wanted to express in SQL, but Oracle wouldn't accept his syntax. The original query used a WITH clause like this (note, I've removed a great deal of irrelevant detail here, the actual query had a lot of other stuff going on, but this will do to illustrate this point): WITH q AS (SELECT Jeffrey Kemphttp://www.blogger.com/profile/08514743151986599227noreply@blogger.com

Asia Down Under

Mon, 2008-04-21 14:04
Um, could someone either (a) tell me when Australia became part of Asia? or (b) send Oracle University to Geography 101... :) "First Time in Asia! ... Melbourne... Sydney... Brisbane" Jeffrey Kemphttp://www.blogger.com/profile/08514743151986599227noreply@blogger.com

Learn more about Oracle by examining obscure SQL

Mon, 2008-04-21 03:51
How many features can you use in one SQL query to solve a problem? (that is, how many necessary features do you need without deliberately obfuscating your code) In this rather educational example we see (1) XML, (2) UTL_RAW.reverse and UTL_RAW.cast_to_varchar2, and (3) the MODEL clause: "How to convert a number from any base to any base in SQL" (Frank Zhou). Unfortunately the query crashes withJeffrey Kemphttp://www.blogger.com/profile/08514743151986599227noreply@blogger.com

My APEX application asks users to log in twice

Fri, 2008-04-11 00:58
I had this problem with an Apex application I'm building, and finally found the cause this morning, so I thought I'd share it. This particular application has some pages which are only available to authenticated users, and some pages which are visible to everyone. One nice thing about Apex is that it automatically redirects users to the Login screen if they try to navigate to a protected page. Jeffrey Kemphttp://www.blogger.com/profile/08514743151986599227noreply@blogger.com

TOO_MANY_ROWS side effect

Mon, 2008-03-10 15:28
I used to assume that whenever a TOO_MANY_ROWS exception is raised, the target bind variables would be left untouched. Until today I've never written any code that relies on the bind variables being in any particular state when a TMR exception is raised, so was surprised. For example, given the code below, I would expect the dbms_output to indicate that v is null: CREATE PROCEDURE proc (v OUT Jeffrey Kemphttp://www.blogger.com/profile/08514743151986599227noreply@blogger.com

Are you "switched on"? [Ad]

Wed, 2008-02-13 01:07
Want to work in Perth, Western Australia? Finished an I.T. degree, or about to? Want to gain experience in large I.T. projects? Join us! Free training in Oracle and mentoring Dynamic Project Excellent foundation for your career Wanted: Graduate Developers [it.seek.com.au]Jeffrey Kemp