Skip to content

Instantly share code, notes, and snippets.

@mathiasmag
Created February 23, 2018 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathiasmag/25837973ea4b910e07b841c12190fa80 to your computer and use it in GitHub Desktop.
Save mathiasmag/25837973ea4b910e07b841c12190fa80 to your computer and use it in GitHub Desktop.
sqlcl script to be used in VisualCode for PL/SQL build tasks
#!/bin/sh
# Modified to use sqlcl instead of sqlplus
# Origin: https://ora-00001.blogspot.se/2017/03/using-vs-code-for-plsql-development.html
# https://gist.github.com/mortenbra/9af4b0211782161619c0bab01ed7031a#file-vscode_run_sqlplus-sh
# make sure script uses correct environment settings for sqlplus
source ~/.profile
SQLPATH=$SQLPATH:.;export SQLPATH
# run sqlplus, execute the script, then get the error list and exit
~/sqlcl/bin/sql $1 << EOF
$2
@_show_errors.sql
exit;
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment