Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help Renaming Tables!!!
For one thing, you cannot embed a SELECT within an ALTER TABLE statement. How are you trying to implement this process? Are you writing PL/SQL code on the server, or are you executing these statements from a client? If you're writing PL/SQL on the server, you'll need to use dynamic SQL (the DBMS_SQL package) to execute your ALTER TABLE statement.
Jonathan
On Mon, 14 Aug 2000 15:32:14 -0500, "Tommy" <motykat_at_thriftycall.com> wrote:
>This is what I have tried and can not make it work:
>
>Alter Table
>(select 'OCC'|| (to_char(sysdate,'YYYYMMDD') - 15) || 'DAILY' into t from
>dual)
>Rename To
>(select 'OCC'|| (to_char(sysdate,'YYYYMMDD')) || 'DAILY' into t from dual);
>
>Can anyone tell me how to make this work?
Received on Tue Aug 15 2000 - 08:56:42 CDT