Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Shell script to sql

Re: Shell script to sql

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Tue, 14 Aug 2007 06:37:49 -0700
Message-ID: <1187098669.650958.120580@x40g2000prg.googlegroups.com>


On Aug 14, 9:08 am, joshboski <josh.burkhol..._at_gmail.com> wrote:
> i currently have a shell script in which i am trying to pass a txt
> file, by lines into a sql script. the txt file looks like this:
>
> filename.ext : category PossiblyAnotherCategory
> filename2.ext : category PossiblyAnotherCategory
> ...
>
> For each line set each word as a variable and pass it to the sql
> script..

joshboski, what is it you expect to use the vairable for?

I believe from your problem description that you will need to resort to using a scripting language such as ksh or perl to format the file data into a string that can be passed to SQLPlus as a command perhaps something like

sqlplus user/password <<EOF
exec procedure($variable)
exit
EOF A better problem description and better sample data might get you a more detailed response.

HTH -- Mark D Powell -- Received on Tue Aug 14 2007 - 08:37:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US