2 Replies Latest reply on Sep 28, 2017 8:24 AM by Kanda-Oracle

    pass parameters to Oracle SQL file inside shell script

    Arun Thomas

      I got really strange issue

      We are calling one .sql file with parameters inside host file, the sql has 5 parameters

      sqlplus -s /nolog >> $APPL/$APPLLOG/l$req_id.req <<!  connect $userpass    @$XXBC_TOP/sql/POFTPGEN.sql $req_id $filename $utl_file_dir $vendor_num $org_id!`

      when i print using echo all the parameters are getting printed in the log file.

      The issue is , inside POFTPGEN.sql file &4 gets both the values of $vendor_num $org_id for example &4 is passing like 1031 506 and the fifth parameter is passing as null , can some one help me in understand , what am i doing wrong here.

      Expected is &4 should be 1031 and &5 should be 506

      Current behavior &4 is 1031 506 and &5 is null