Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: call sql oracle 8.i with unix script fails
"Ed Yin" <vraagme_at_hotmail.nl> wrote in
news:497fd$45a8d9e9$50398baa$23489_at_news.chello.nl:
>
> "Ana C. Dent" <anacedent_at_hotmail.com> schreef in bericht
> news:Xns98B6C3B00D8B6anacedenthotmailcom_at_69.28.173.184...
>> "Ed Yin" <vraagme_at_hotmail.nl> wrote in >> news:4abdb$45a7d753$50398baa$18065_at_news.chello.nl: >> >>> hello, >>> >>> maybe someone can help me out on this script it will only execute 1 >>> sql statement depending on what file_name what is wrong with what i >>> am trying to do? >>> >>> >>> i try to call a sql like this depending on interface type >>> >>> this shell is called rim started like this ./rim POR AL >>> where POR >>> is type en AL = $2 file name in this test >>> >>> >>> $1=INTTYPE >>> file_name='test.por' >>> typeO=ORD >>> typeP=POR >>> >>> if $1=$typeO >>> then >>> sqlplus -s / @ord_controle.sql $2 $file_name <<F / >>> echo processing $typeO $1 $sql1 $file_name >>> else $1=$typeP >>> sqlplus -s / @por_controle.sql $2 $file_name <<F / >>> echo processing $typeP $1 $sql2 $file_name >>> show errors; >>> F >>> fi >>> exit 0 >>> >>> thanks Ed >>> >>> >>> >>> >> >> First make ity work, then make it fancy. >> I've done *nix for 20+ years & Oracle for 10+ >> & for the life of me I have no idea what you are doing. >> It kind of appears you are trying some form of here script, >> which make absolutely no sense inside a shell's "if" statement.
A little knowledge is a dangerous commodity. IMO, I would not use in combination @myname.sql AND <<E (here script) I use one or the other but NEVER tried using in combination. Try "encapsilation" create small working & bulletproof scripts which do 1 thing well & one thing only. Call/invoke it when appropriate.
Unless I am still sleep walking, you have NEVER actually stated what is wrong. You imply a problem, but I have no idea what you are seeing & what you are posting about.
Typically many scripts run in background. I see NO benefit of including
SHOW ERROR;
'cuz your code can't take action based upon its output.
Received on Sat Jan 13 2007 - 10:35:49 CST
![]() |
![]() |