Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Copy table data from one schema to another scheman
On Mon, 21 Apr 2003 10:55:15 -0700, L1 wrote:
> Doggy Daddy <spamhole_at_nospam.org> wrote in message > news:<pan.2003.04.17.20.22.49.958965.18158_at_nospam.org>...
> > Since the Alter View xxx Add xxx. will only allow adding constraints, > but not columns, creating the view manually is the only way i can think > of to accomplish the task described above which will be very tedious. > > Any other suggestions? > > l1
Look at USER_VIEWS first to see what you have to work with. There's a column there that contains the SQL definition of each view. You can take this text, edit it (either by hand, in PL/SQL, or by some other means) so it also includes whatever additional columns you want (and change the base table names, if necessary), and then execute the modified CREATE VIEW in your archive schema. How complicated this editing will be depends on how complicated your views are. That in turn will determine whether it makes more sense for you to do this by hand or by some kind of text-modifying automation.
And don't forget, if you're actually planning to USE your archive tables (and not just retain them for historical purposes), you may also need to duplicate indexes and constraints from the main schema. Received on Sat Apr 26 2003 - 19:31:11 CDT
![]() |
![]() |