passing sqlplus output to a csh variable -


what correct csh syntax store output of sqlplus block?

sqlplus -s / <<sql set feedback off set linesize 100 set lines 150 set pages 0 set head off set serveroutput on size 10000  select 1 dual; sql 

in example, i'd able assign value '1' variable in csh script. using shell variant not option.

you need write variables in sql*plus file can source once control has returned csh program.

note i'm showing how store output of sql*plus column value in sql*plus variable using column statement. can skip step if code simple, though worthwhile addition.

sqlplus -s apps/apps@vis <<sql set feedback off set linesize 100 set lines 150 set pages 0 set head off set serveroutput on size 10000 column result new_value result  select 1 result dual;  prompt variable result = &result.  spool output.csh prompt set result = &result. spool off sql  source output.csh echo "back in csh , result = $result " 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -