We help IT Professionals succeed at work.
Get Started

How do I insert old partion into a table?

IT_ETL
IT_ETL asked
on
59 Views
Last Modified: 2015-08-10
I like to insert old partion into a table. For example, partition (P201505) which contains May data needs to be inserted into tmp_table1. But the table already has partitions P201506 and P201507. The script for P201505 is following,

alter table tmp_table1 add PARTITION P201505 VALUES LESS  (201506) COMPRESS;

For partitions P201506 and P201507 are following. By the way, these partitions already exist on the table.

alter table tmp_table1 add PARTITION P201506 VALUES LESS  (201507) COMPRESS;
alter table tmp_table1 add PARTITION P201507 VALUES LESS  (201508) COMPRESS;

Please advise how to insert a old partition P201505 into a table considering that partitions P201506 and P201507 already exist on the table.
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE