I’ve recently spent a few hours debugging some user defined reports. A post on how to add trace/disconnect context menus to a session report required that I figure out what session my worksheet was running under.
The code was easy…
SELECT SYS_CONTEXT ('USERENV', 'SID') FROM DUAL;
…but I’m lazy.
Open your preferences and go to the SQL Editor Code Templates.
As you code these, you recall them from what you label them via the ID, not the code itself.
And then you activate them in the editor via Ctrl+Spacebar.
Don’t like this keyboard sequence? Change it!.
Not working for you?
Upgrade. I found that a few of mine wouldn’t work, and we found a bug. It’s been fixed in v4. Another reason to go upgrade, like…today.