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: another thing I used to know

RE: another thing I used to know

From: Carel-Jan Engel <cjpengel.dbalert_at_xs4all.nl>
Date: Thu, 26 Aug 2004 16:59:26 +0200
Message-Id: <1093532366.20098.171.camel@dbalert199.dbalert.nl>


Hi Paula,
Two options:

Nr1

one file

paula.ksh:

#!/bin/ksh
un=scott
pw=tiger
MDL_CDE="some value you like"
sqlplus /nolog <<!
CONNECT ${un}/${pw}
SELECT ${MDL_CDE}
FROM dual
/
exit
!

Nr2:

Two files:
paula.sql:

SELECT '&&1'
FROM dual
/

paula.ksh

#!/bin/ksh
un=scott
pw=tiger
MDL_CDE="some value you like"
sqlplus ${un}/${pw} @paula ${MDE_CDE}

I prefer the first: all code in a single file, and passwords don't get revealed in process lists.

Best regards,

Carel-Jan Engel

===
If you think education is expensive, try ignorance. (Derek Bok) ===

On Thu, 2004-08-26 at 16:43, Paula_Stankus_at_doh.state.fl.us wrote:

> In a ksh script I am trying to declare and pass a variable. I thought =
> the syntax was ${variable name} but it is blowing up:
>
> WRAPPER_RTN=3D pkg_bc32_wrapper.prc_wrapper("${MDL_CDE}",
> -- mdl_cde
> *
> ERROR at line 5:
> ORA-06550: line 5, column 34:
> PLS-00201: identifier '${MDL_CDE}' must be declared
>
> how do I pass this as a variable from ksh to SQL?
>
> Thanks,
> Paula
> ----------------------------------------------------------------
> 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 Thu Aug 26 2004 - 09:57:37 CDT

Original text of this message

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