Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> pl/sql help
i'd appreciate any tips on how to efficiently do the following:
i have two tables (both contain the same type of data and column definition but the columns are prefixed with a 'B')
A_TABLE
COLUMN1 DATE COLUMN2 DATE COLUMN3 DATE COLUMN4 DATE B_TABLE B_COLUMN1 DATE B_COLUMN2 DATE B_COLUMN3 DATE B_COLUMN4 DATE
what i would like to do is take table A_TABLE and rename it to something like ORIG_A_TABLE (truncate the original table name
so that when orig_ is prefixed to it, the table name is less than 30 characters).
then, i want to create a view on top of the B_TABLE (with the name A_TABLE), and the ddl would look something like:
create view A_TABLE as
select B_COLUMN1 as COLUMN1,
B_COLUMN2 as COLUMN2, B_COLUMN3 as COLUMN3, B_COLUMN4 as COLUMN4
i hope i've explained this well. i'm looking to do this with pl/sql. the database version i am using is 8.1.7.
thanks in advance for any help anyone could provide.
-maurice
samuels_at_seas.upenn.edu
Received on Mon Feb 23 2004 - 08:24:43 CST
![]() |
![]() |