Home » SQL & PL/SQL » SQL & PL/SQL » question
question [message #38967] |
Fri, 31 May 2002 07:34 |
JoJo
Messages: 18 Registered: January 2002
|
Junior Member |
|
|
EXcuse for that question which might seems to be evident for someone but:
I have a code like this :
T10 si (@154="O") et (@319<>" ")
%CR $1= codsoc
%CR $2= achvte
%CR $3= typeve
%CR $4= numeve
%CR $5= numpos
V10 ~901=PROC1("ap$maq/maj_prxuf.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~900=PROC1("ap$maq/maj_poivar.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~903=PROC1("ap$maq/maj_prxvdu.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~905=PROC1("ap$maq/maj_prxuf2.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~906=PROC1("ap$maq/maj_prxbrt.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~907=PROC1("ap$maq/maj_prxuf3.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~908=PROC1("ap$maq/maj_prxtav.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~909=PROC1("ap$maq/maj_prxuf4.sh", ~001, ~002, ~003, ~004, ~005)
T10 fsi
T10 si (@154="N")
V10 ~904=PROC1("ap$maq/maj_qtesup2.sh", ~001, ~002, ~003, ~004, ~005)
T10 fsi
you can see that it calls tons of sh files like that :
echo "MAJ (soc $1) prxuf pour $2/$3/$4/$5"
$ORACLE_HOME/bin/sqlplus -s soc1/infor1 <<EOF > /dev/null
update evp
set evp.prxuf=(select (decode(evl.qtesup2,0,1,evp.PRXVDU/evl.qtesup2)) from evl
where evp.codsoc=evl.codsoc
and evp.achvte=evl.achvte
and evp.typeve=evl.typeve
and evp.numeve=evl.numeve
and evp.numpos=evl.numpos
and evl.numlig=1)
where evp.codsoc=$1
and evp.achvte='$2'
and evp.typeve='$3'
and evp.numeve=$4
and evp.numpos=$5
and exists(select 1 from evl
where evp.codsoc=evl.codsoc
and evp.achvte=evl.achvte
and evp.typeve=evl.typeve
and evp.numeve=evl.numeve
and evp.numpos=evl.numpos
and evl.numlig=1);
/
commit;
EOF
I have succeed to "compress" all that sh files in one pl/sql procedure.
The problem is that i don t know how to call this procedure and pass it the right parameters with that kind of code. Thanks for helping me.
|
|
|
|
Goto Forum:
Current Time: Wed Apr 24 02:10:24 CDT 2024
|