Home » SQL & PL/SQL » SQL & PL/SQL » create dynamic tables
create dynamic tables [message #208469] Mon, 11 December 2006 00:22 Go to next message
prasanna_anbu
Messages: 34
Registered: November 2006
Location: india
Member
I want to create dynamic tables based on month and country_cd
for each month each country wise i want to create. example
if i have 2 months data for ind then i want to create 2 tables dynamically.
Re: create dynamic tables [message #208476 is a reply to message #208469] Mon, 11 December 2006 00:35 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
No, you don't want to do that. Maybe you want to partition one static table, but you do NOT want to dynamically create tables.
How would you use them? More dynamic sql?
Believe me, you definitely don't want to go there..

[Edit: Tell us, why do you think you want to do this; what do you want to gain from it?]

[Updated on: Mon, 11 December 2006 00:36]

Report message to a moderator

Re: create dynamic tables [message #208480 is a reply to message #208476] Mon, 11 December 2006 00:45 Go to previous messageGo to next message
prasanna_anbu
Messages: 34
Registered: November 2006
Location: india
Member
in existing system we used partitions ,now we are going to create tables based on month and country for last 24 months only,and we droped the table after loading into data warehouse
so there is only 24 tables maintain in the schema for a country.
this is because prevent the data loss.
Re: create dynamic tables [message #208501 is a reply to message #208480] Mon, 11 December 2006 01:48 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
So create 24 tables for every country; for example, "Croatia_01, Croatia_02, ..., Croatia_24". When you move data into the warehouse, truncate the table and it will be ready (empty) for new data.

I accept that you don't believe me saying this, but I'd suggest you to believe Frank: you don't want to dynamically create tables. Think about it. If you still aren't convinced, think again.
Re: create dynamic tables [message #208509 is a reply to message #208501] Mon, 11 December 2006 02:40 Go to previous message
prasanna_anbu
Messages: 34
Registered: November 2006
Location: india
Member
Here i used the exchange partition to load the 24 tables data to one partitioned table in the atomic.

[Updated on: Mon, 11 December 2006 02:41]

Report message to a moderator

Previous Topic: Urgent : Errors :- ORA-01034 and ORA-27101
Next Topic: PLSQL BLOCK: Subquery In Select Clause Returns ERR
Goto Forum:
  


Current Time: Sun Dec 04 16:19:08 CST 2016

Total time taken to generate the page: 0.10605 seconds