I'm a very beginner Julia user but would like to use it for some of my projects.
Many of my projects require me to make a quick connection to Oracle to get an ID number of some other data. I can do this by running sqlplus from other programs like shell or tcl, but I've tried the syntax in the Julia documentation, but always get one error or another.
In Tcl it looks something like this
exec sqlplus -s user/pass@dbname << "
SET PAGESIZE 0 FEEDBACK OFF VERIFY OFF HEADING OFF ECHO OFF
select ID from table1 where name='abc';
exit;
"
From julia, I'm trying to use the run command like this
run(`sqlplus -s user/pass@dbname << "
SET PAGESIZE 0 FEEDBACK OFF VERIFY OFF HEADING OFF ECHO OFF
select ID from table1 where name='abc';
exit;
"
`)
but I get various errors from Julia like
Stacktrace:
[1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
[2] warn_shell_special(::String) at ./shell.jl:8
[3] #shell_parse#236(::String, ::Function, ::String, ::Bool) at ./shell.jl:103
[4] (::Base.#kw##shell_parse)(::Array{Any,1}, ::Base.#shell_parse, ::String, ::Bool) at ./<missing>:0 (repeats 2 times)
[5] @cmd(::ANY) at ./process.jl:796
[6] eval(::Module, ::Any) at ./boot.jl:235
[7] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
[8] macro expansion at ./REPL.jl:97 [inlined]
[9] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
Any help from anyone?
pipelinecommand instead of<<- Tasos Papastylianousqlplusis not in the path / accessible from your julia environment. I.e. it has nothing to do with the particular syntax you used (obviously this doesn't mean that if you put it in the path, it will immediately work, since the syntax may also be slightly wrong). - Tasos Papastylianouechoing the string instead, and using that as the input to your pipeline - Tasos Papastylianou