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 -> pl/sql help

pl/sql help

From: <samuels_at_blue.seas.upenn.edu>
Date: Mon, 23 Feb 2004 14:24:43 +0000 (UTC)
Message-ID: <c1d2fb$csm1$1@netnews.upenn.edu>


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

from B_TABLE

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

Original text of this message

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