• Home
  • Map
  • Email: mail@helpbest.duckdns.org

Syntax error unexpected end of file sqlplus

If it terminates with error this way, the exit code will be captured by the shell environment variable $? VAL11= $ ( $ { ORACLE_ HOME} / bin/ sqlplus - s ' / ' < < - EOF SELECT COUNT( * ) FROM DBA_ USERS WHERE USERNAME= upper( ' $ SCHEMA_ NAME' ) ; EOF ). share| improve this answer. answered Aug 5 ' 17 at 6: 05. Thanks for your responses. I did below two steps to resolved the issue - 1. dos2unix TestData. csv - although I had created this file in UNIX itself but did this as well. a new line at the end of the file as suggested by regards. hey I am very new to shell scripting and keep getting this error message so any advice would be gladly received! I have simplified my code majorly and. Note NO sqlplus or EOF etc required to load data into a schema:.

  • Windows 10 fatal error unable to find local grunt
  • Error correction in esl classroom
  • Sysprep a fatal error occurred windows 7
  • Parse error syntax error unexpected var t variable in
  • Josh segal trial and error actor
  • Error loading operating system in windows 8

  • Video:Sqlplus syntax file

    Sqlplus syntax error

    In 2nd edit update, I looked here on S. and found an example sqlldr cmdline that has the correct syntax and have modified to work with your variable names. The EOF token must be at the begining of the line, you can' t indent it along with the block of code it goes with. If you write < < - EOF you may indent it, but it must be indented with Tab characters, not spaces. So it still might not. The diagnostic " unexpected end of file" is a hint that you have some unmatched or unterminated opening syntactical construct ( if w/ o fi, do w/ o done, opening brackets w/ o the associated closing one, opening but. a= $ 1 if [ $ a - eq 1 ] then sqlplus - s < < END insert into bckup_ marc_ parameter_ lookup select * from prospect. marc_ parameter_ lookup; commit; exit; END elif [ $ a - eq 2 ] then sqlplus - s. Edit: Note that the original post has been edited since this answer was written and has been reformatted. You should look at the history to see the original formatting to understand the context for this answer. This error occurs. I have an SQL query that when it is put in to a function it stops working with this syntax error: unexpected end of file error message.

    function pull_ data { sqlplus - s < < EOF SELECT DISTINCT order_ number, order_ total_ items, order_ total_ value FROM orders. The indented heredoc delimiter breaks it. answered Jan 22 ' 14 at 12: 10.