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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Instream SQL in an NT Batch script

RE: Instream SQL in an NT Batch script

From: Gene Sais <Gsais_at_co.palm-beach.fl.us>
Date: Fri, 23 Jul 2004 16:27:41 -0400
Message-Id: <s1013c85.093@ISSFS2.co.palm-beach.fl.us>


Another good reason to use perl :). Works on all OS's. >>> BranimirP_at_cpas.com 7/23/2004 4:23:22 PM >>>
> I am trying to move a couple of Unix scripts to an NT server. I
know
> just about everything needs to change but the scripts use in
> stream SQL
> commands and for some reason NT doesn't like the syntax.
>
> The code is simple just like:
> sqlplus / <<EOF
> select something from somewhere;
> EOF
>
> It complains and says <<EOF not expected here. =20
> Works on Unix and Linux.
>
> What am I missing?

What you are missing on NT is decent scripting language (and no, VB Script aint it either).

Sooner you shake off DOS-batch-ing from your mind, sooner you'll be able to "do stuff" you want or need to do...

By default - anything you try to do via DOS batch will be:

Ugly: read as "unreadable and hard to maintain"

Kludgey: to get DOS batch to do lots of things - you'll have to

        wrap your mind around insane constructs

Unreliable: there are ahem, slight but very gotcha differences

             between DOS shells across various Win platforms

What I'd do if I had lots of "streamed" scripts I'd want to share between Unix and Windows - I'd rewrite 'em all in Python (or Perl if only I knew it;-) and run one and same set of scripts on both "ends", or write small Python (or Perl) parser and stream existing sql stuff into Python/Perl script that will do the job.

Branimir



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------



----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Jul 23 2004 - 15:24:47 CDT

Original text of this message

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