Skip to content

Instantly share code, notes, and snippets.

View tschf's full-sized avatar

tschf tschf

View GitHub Profile
@tschf
tschf / SQL*Plus pipe.md
Last active January 12, 2016 19:39
Piping values to SQL*Plus script doesn't work with a HIDE accept param

Piping in input doesn't seem to work when having one HIDE param and one non-HIDE param - refer to sql script below https://gist.github.com/trent-/1c2bb55da5045113498e#file-ords_manual_install-sql

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
tschf / apex_session_utl.sql
Last active August 29, 2015 14:08
Package to re initialise an existing Application Express session from SQL Developer
/* 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
begin
apex_session_utl.re_init_session('xxxxxxxxx');
end;
@tschf
tschf / google_drive.pkb
Last active November 30, 2021 00:36
google_drive in plsql
create or replace
PACKAGE GOOGLE_DRIVE
as
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(
@tschf
tschf / gist:5606476
Created May 19, 2013 02:42
Application Express AJAX File Upload
set define off
set verify off
set feedback off
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
begin wwv_flow.g_import_in_progress := true; end;
/
-- AAAA PPPPP EEEEEE XX XX
-- AA AA PP PP EE XX XX
-- AA AA PP PP EE XX XX