Generating JSON from SQL cursor

It appears there will be a good 1001 uses for the APEX_JSON package in APEX 5, here is one of them.

Previously I had an AJAX PL/SQL callback that returned a relatively simple JSON string, using the LISTAGG technique described by Lucas here.
l_json varchar2(32767);
select listagg('{"id":"'||version||'","content":"'||version||'.x"}',',') within group (order by null) json
into l_json
from (
select distinct substr(version,1,1) version
from apex_timeline
order by version

end getGroups;

Review: The Martian

I think we have a new genre of films for those consumers yearning for science and exploration.

First Gravity took us on a cinematographic journey into low earth orbit.
Then Interstellar took us on an inception style ride.
If you liked these you may enjoy Europa Report, which has a 2001 feel to it.

Now we have The Martian, which only a few years ago was still in the imagination of write Andy (more...)

APEX 5 Change Workspace Authentication

APEX has provided the ability to authenticate your application users against an LDAP server for quite some time.

APEX 5 now provides us the ability to change how we log into the development builder itself, and it's surprisingly easy.

Recently I modified our APEX 5 sandpit to authenticate against LDAP, so we can use our Windows passwords logging into the APEX Development Builder - one less password to manage.

Database ACL

I didn't need to (more...)

APEX 5 Verify Theme Subscription

I was attempting to replicate the navigation bar example from the Opportunity Tracker application and I noticed my application was missing icons from the sub list dropping off the username.
Icons in submenu when visible
Here are the relevant User Interface settings for the Navigation Bar.

User Interface settings
It turns out in newly created application with Theme 42 the following is used as the sublist entry template
<li data-current="true" data-icon="#ICON_CSS_CLASSES#"><a href="#LINK#">#TEXT_ESC_SC#</a></li>

In my application (more...)

APEX 5 Source Used attribute – tolerating less mistakes

If you've upgraded to APEX 5 and find yourself with an error complaining about the 'Source Used' attribute:
then you should thank APEX 5 for finding (and no longer tolerating) a logic bug in your application.

APEX 5 - correcting your applications

Track down that field and set the Source Used attribute to 'Always, replacing any existing value in session state'.

On a side note, setting the application's Compatability Mode to 4. (more...)

Inaugural Developer Choice Awards

Can you think of anyone worthy of being recognised in the following areas?

Developer Choice Awards Categories
Today is the last day for nominations, so visit the website and nominate the first person you think of - right now!

From mid next month you will have a chance to vote for the finalists.

It looks like Oracle are trying really hard to be more involved with the community, so I think good on them for this initiative.

APEX 5 Changing region type

APEX 5 change region type
If only to further emphasise some of the fundamental rebuilds APEX 5 must have undertaken, look at the ability to switch region types.

Prior to APEX 5.0, we could migrate a Classic report to an Interactive Report, but not the reverse. And don't even think about switching to another region type.

Just bear in mind the tweaks and adjustments you'd probably lose as you toggle around. I think it (more...)

Kylie is Dancing with Oracle

Almost five years ago I introduced Kylie to our little Sage flock.

Now she ventures into the world of blogging. She'll no doubt talk about Oracle development in some form, either SQL, PL/SQL, APEX, or for some bizarre reason, JDeveloper.

But who knows where blogging leads, huh?  Check her out at
Aptly named after her passion for dancing.

She's got a related twitter account:

Blog on.

APEX 5.0 Change page in Search bar

One of my favourite features in APEX 4.x was the search bar, often not actually for searching but for opening another page by typing the page number, particularly coming from shared components.
APEX 4.x application search
 For a while I thought I'd lost that feature, since I was expecting to be able to type into were the page number is reported (when in shared components), but you just need to type the page (more...)

APEX blogger from Iran

At Kscope I felt geographically isolated, but I was impressed with all the second language speakers attending.

I can only speak one language, and some would argue I don't do well at that - but people were presenting in a language foreign to their native tongue! Kudos.

The Internet I see and view is predominantly English, and no doubt my search results are skewed accordingly. Occasionally I'll find some bloggers in another language and in (more...)

APEX 5 Colour Contrast

During the APEX 5 early adopter I remember a bit of discussion going around regarding the colour contrast.

I would have been one of the complainers, and it's one topic I forgot to raise with the team when I met them at Kscope.

Use of APEX 5 is ramping up at my current site and I couldn't go any further without having a little play. A while ago I used some filters in my ad (more...)

Thursday Thought: Boredom

Do you ever get bored? I do.

What do you do when you're bored? I eat. I think. I watch.

Sometimes I play on my phone. I whip it out, play some quizzes, read some feeds, send a text.

What I prefer to do is watch the world. There's plenty going on, I walk through a nearby bush regularly and sometimes it's almost like I'm absorbing pleasantness, contentment.

I saw a commercial a few months (more...)

Perth – Free 1/2 day Education Event

Thanks to Sage Computing Services, AUSOUG are hosting a free 1/2 day education event for it's members.

Join us Wednesday 19th August, 2015 at the Duxton Hotel from 2:30pm to be regaled with tales of tuning, APEX, SQL and PL/SQL.

  • Penny - Practical Tuning Tips for Developers
  • Kylie - Snazzy SQL: Titbits to advance your code
  • Katie - PL/SQL: Are you making the most of it?
  • Scott - APEX 5 isn't just a sexy (more...)

My Kscope15 sessions

My Kscope15 sessions are now available on my presentations page.

I linked to the Prezi version as they don't translate well to PDF, as those of you who tried downloading off the Kscope mobile app may have found.

The supporting code from my deep dive demos can be downloaded here:

Thank you to all those who attended, and cheers for all the great feedback, I sincerely appreciate it. I wish I (more...)

Podcast recommendation: SGU

Another item on my backlog is getting up to date on my favourite podcasts. I've got a post drafted that lists my recommendations, but if you're looking for a fun, well produced science podcast then go no further than The Skeptics Guide to the Universe.

They are generally 90 mins an episode and if you're not into podcasts already that may seem daunting. To me they fill my commute with fun but thought provoking stuff (more...)

Exploring dynamic pivot options

In looking for information on pivoting variable number of columns, I stumbled across a question I once managed to AskTom, many moons ago.

Adrian Billington has an interesting lead into an XML solution with pivot, but would need more digging to finalise conversation of XML data for APEX to use.

Then I found Tom's answer using easy to understand dynamic SQL (properly asserted, no less)
https://asktom. (more...)

Back to work, post Kscope15

After landing late Wednesday night I'm officially back to work on Monday morning, greeted with this:

It's good to be back. There is an APEX 5 instance sitting on 12c ready for app regression testing once it has data, but work before play - got a small backlog (more...)

KScope Day 2

I struggled a little bit this morning, for the first time in a few days the alarm woke be up with a start. I'm not sure my brain was ready. Kudos to those that tackled the 5k, I had the energy a few days ago...

Printing with node.js

Dimitri provided a great intro to help us all understand what node.js is all about and how to learn more, covering
- Installing node
- (more...)

KScope Day 1

Day 1? Really, is that all? There are so many things going on it feels like day 3.

And I'm not even participating in everything since I'm also coming back to do some family time each day.

Chi Gung

I gave this a go this morning after not being able to find Kent on the first day. It was interesting and there were some good exercises that everyone should consider doing in the morning, though (more...)

Listen to Kscope15 on Twitter

If you're at Kscope15 (even if you're not!), do you realise there is another set of conversations going on beyond the talks and beyond the between-session banter?

It's online of course, and it's on Twitter. It's live; it's interactive; and it's worth 'listening' to, if not contributing as well.

Visit this URL to read what's going on, even if you're not registered.
It might change your mind on registering for (yet (more...)