Home » RDBMS Server » Server Administration » unix-sql
unix-sql [message #371085] Thu, 24 August 2000 09:50 Go to next message
Vic
Messages: 8
Registered: August 2000
Junior Member
my problem: unix calling sql (code below) trying to pass a parm/variable to sql and it's not working. i'm new to all of this so ANY help would be greatly appreciated.

xxstep.sh
-------------------------------------------------------
export ORACLE_SID=BISPROD
export LD_LIBRARY_PATH
job="vicstepx"
pathname="/Apps_Prod/"
cat /Data_Prod/vicstep1.dat | while read LINE > "$pathname"userid.txt
echo $LINE --------- value is 052T
do
rm /Data_Prod/portwork/*.txt
read uid < "$pathname"zzzzzzz.UID
echo $uid
date > "$pathname"$job.out
$ORACLE_HOME/bin/sqlplus $uid @"$pathname"$job <"$pathname"userid.txt >> "$pathname"$job.out
date >> "$pathname"$job.out
cd /Data_Prod/portwork
/usr/local/bin/zip /Data_Prod/portzip/USR"$LINE".zip *
done
exit 0

vicstepx.sql
-------------------------------------------------------set heading off;
set feedback off;
set pagesize 0;
set echo off;

set linesize 3000
set termout off;
spo /Data_Prod/portwork/sam.txt;
select cot ||','||
scot||','||
opencs||','||
futcs
from bisadmin.portablebis_vic
where userid = &LINE;
------ value should be 052T but it's notAnyIdeas
spo off;
exit;
Re: unix-sql [message #371086 is a reply to message #371085] Thu, 24 August 2000 12:57 Go to previous message
Melissa
Messages: 65
Registered: January 2000
Member
Example: change @"$pathname" to @${pathname}
Previous Topic: images out to the file system
Next Topic: Error while adding not null constraint
Goto Forum:
  


Current Time: Fri Mar 29 02:06:58 CDT 2024