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

Home -> Community -> Usenet -> c.d.o.misc -> script to recreate all views - problem with 'text' column in user_views

script to recreate all views - problem with 'text' column in user_views

From: Richard Shea <richardshea_at_fastmail.fm>
Date: 22 Jan 2002 15:17:42 -0800
Message-ID: <282f826a.0201221517.44ac31c4@posting.google.com>


Hi - I want a script which will recreate all views in a schema. I've written :

set long 4000
set heading off
set line 4000
select 'create or replace view ' || view_name, ' as ', text from user_views

which seems to be halfway there but now I need (I think) to put a '/' at then end of each command. Can anyone tell me how to do that ?

While I'm asking I think having to set the line/long length to a given width in order to not truncate is a bit clunky too is there a better way to deal with the 'text' column (which has a type of 'long') ?

thanks

Richard Shea.

PS: Thinking about alternatives to this approach I'm on a W2K box so I can't easily use the various (unix based) scripts to unmangle an EXP output and although I've got a copy of TOAD (albeit the free version) I can't see a way to select all views at one go in order to have them all scripted - maybe I've missed that ? Received on Tue Jan 22 2002 - 17:17:42 CST

Original text of this message

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