Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create table name with current date

sunitha2010Oct 10 2012 — edited Oct 11 2012
Helllo gurus,

Hope your doing good...

I need one small help from you..

Is it possible to create a table name with today date?

I have requirement --

I am exporting data from staging table to Flat file. Before exporting data i have to take back up of data daily.Whatever the records are available in the staging table for current day, i have to create another temp table.

Ex:

Staging table :

table name:

EXPORT_DATA_1


SELECT * FROM EXPORT_DATA_1 WHERE TRUNC(START_DATE)=TRUNC(SYSDATE);

i have to create table like below..

CREATE TABLE TEMP_BKUP_11102012 AS SELECT * FROM EXPORT_DATA_1 WHERE TRUNC(START_DATE)=TRUNC(SYSDATE);


Oracle version : 11g(11.0.1)

how can i append sysdate with table name?

Thanks a lot for your help and suggestions.



Sunitha..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2012
Added on Oct 10 2012
8 comments
13,468 views