Re: trying to use sqlplus to do a build and making it dynamic

From: Jack van Zanen <jack_at_vanzanen.com>
Date: Thu, 5 Jun 2008 10:15:13 +1000
Message-ID: <77a615a70806041715j109c518bp106bb008fe46eb60@mail.gmail.com>


Hi,

something like this?

undefine s_next_script
set echo off
set termout off
column xyz NOPRINT NEW_VALUE s_next_script select '<scriptname> ' ||<column_parameter> as xyz from table where <clause to make sure only 1 line>; set termout on
@@&s_next_script

Jack

On 05/06/2008, Rick Ricky <ricks12345_at_gmail.com> wrote:
>
> I can do this with a shell or with any other programming language and call
> sqlplus. I am trying to do this with just sqlplus scripts. I have code to do
> a build where I create tables, users, etc... Some of these can have some
> differences between databases (such as tablespaces) and some other things.
>
> I would prefer not to have to do:
>
>
> prompt please enter tablespace name
> accept tablespace
> @mytablescripts &tablespace
>
>
>
>
> I would like to use some form of configuration table. Is there anyway to do
> the following.
>
>
> have a configuration table with data in it
> query it in a script and put it in a variable. (this is easily done with
> pl/sql)
> then pass that variable to a new script.
>
>
> I would need to query the data and put it in some form of sqlplus variable
> that I can pass to another sqlplus script.
>

-- 
J.A. van Zanen

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 04 2008 - 19:15:13 CDT

Original text of this message