Skip to content

Instantly share code, notes, and snippets.


tschf tschf

View GitHub Profile
View gist:d5eb35ba39495e69a9990957dc2c4af3
List<SystemVersion> installedVersions = new List<SystemVersion>();
installedVersions.Add(new SystemVersion("system17.1.123.1256"));
installedVersions.Add(new SystemVersion("system17."));
installedVersions.Add(new SystemVersion("system4.2.123.1256"));
List<SystemVersion> sortedVersions =
tschf / script.sql
Last active May 7, 2017
Oracle: case with a tuple (object)
View script.sql
create type ot_info is object (
a number,
b number,
c number,
map member function equals return raw
create type body ot_info as
tschf / query.sql
Created Sep 2, 2016
SLK-581 Linkage in SQL
View query.sql
set sqlformat ansiconsole
with raw_data as (
upper('Smith') last,
upper('Nicholas') first,
to_date('29-01-1959', 'dd-mm-yyyy') dob,
'M' gender
from dual
tschf /
Created Aug 31, 2016
Atom fresh sessions

Atom has a config not in the UI: core.restorePreviousWindowsOnStart.

Set this to false in your config.cson file in order to start Atom in a blank state when you launch Atom.

View gist:0e75f798c5b6be79ef21
$ /home/trent/node-v0.12.2-linux-x64/bin/node app.js dev 110
options { configFile: '/home/trent/apex-diff/config/config.json',
sqlcl: '/opt/sqlcl/bin/sql',
debug: true,
rebuildTempFile: false,
{ dev: 'dl_test/dl_test@localhost/xe',
prod: 'dl_prod/dl_prod@localhost/xe' } }
tschf / download.sql
Created Aug 10, 2015
Download file with wpg_docload
View download.sql
l_file files%rowtype;
select *
into l_file
from files
where id = 261;
tschf /
Last active Aug 29, 2015
Using SSH Connections for ORDS Admin

I set up the the SSH profile:

See: sshprofile.png

Then I can set up the connection by specifying the type as SSH, successfully:

See: ssh_connection_test.png

However, in the REST Admin, I don't get the SSH connection option:

tschf / SQL*Plus
Last active Jan 12, 2016
Piping values to SQL*Plus script doesn't work with a HIDE accept param
View SQL*Plus

Piping in input doesn't seem to work when having one HIDE param and one non-HIDE param - refer to sql script below

Scenario 1: Both accepts are non-HIDE.... works fine
Scenario 2: Both accepts are HIDE.... works fine
Scenario 2: At least one is HIDE and one isn't.... doesn't work
Scenario 3: Only one param (HIDE or non-HIDE doesn't matter).... works fine

Call script:

tschf / apex_session_utl.sql
Last active Aug 29, 2015
Package to re initialise an existing Application Express session from SQL Developer
View apex_session_utl.sql
/* Usage:
Package to get an apex session from SQL Developer (or other external tool) based on an existing session ID.
Useful to have parameterised views return data
--Get session in SQL Dev, replacing xxxxxxxxx with your actual session
tschf / google_drive.pkb
Last active Jun 20, 2019
google_drive in plsql
View google_drive.pkb
create or replace
type t_varchar2 is table of varchar2(50);
-- Set default folder ID to upload to (got from last portion of URL when opening folder)
g_upload_folder_id varchar2(400) := '';
procedure get_authorization_url(
You can’t perform that action at this time.