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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL function to create a table in alternate tablespace

Re: PL/SQL function to create a table in alternate tablespace

From: Quinton McCombs <quintonm_at_bellsouth.net>
Date: Tue, 03 Nov 1998 16:16:22 GMT
Message-ID: <363F2CBB.4914E216@bellsouth.net>


You might consider using snapshots instead of recreating the table each time....

Steve Keider wrote:
>
> Hi.
>
> I am pretty new to Oracle and PL/SQL, and am having a hard time
> finding documentation with good examples.
>
> 1. I would like to create a Procedure which drops a table in my
> warehouse tablespace and then recreates it from the source tables.
> I think the code should be something like this.
>
> CREATE OR REPLACE FUNCTION create_whtable
> IS
> BEGIN
> DROP TABLE FA_DBA.FARS;
> CREATE TABLE whtable TABLESPACE warehouse_data SELECT * FROM
> sourceview;
> END;
> /
>
> 2. I then would like to schedule this procedure to be run once a week
> using the DBMS_JOB package, but I have no idea how to use this
> package.
>
> Any help would be much appreciated
>
> TIA,
>
> Steve Keider
Received on Tue Nov 03 1998 - 10:16:22 CST

Original text of this message

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