I am looking to copy data from one partition to another for testing purposes.
My table is partitioned on create_date so I would like convert the old
create_date values (2011-05-20) to a new values (2011-05-21) so it
goes into another parition. In addition, I want is there any easy way to
convert null values to a default value.
Can this be done via a SQL statement? Is so can somebody provide and example or point me to the correct place in the documentation.
I am looking to copy data from one partition to another for testing purposes.
My table is partitioned on create_date so I would like convert the old
create_date values (2011-05-20) to a new values (2011-05-21) so it
goes into another parition.
A simple insert statement will do it, be sure you populate your insert statement - probably with an append hint - from souce partition, like FROM mytable PARTITION (mysourcepartition)
In regards to adding one day to the date you can always use (mydate + 1) syntax.
Originally Posted by BeefStu
I want is there any easy way to
convert null values to a default value.
Research NVL() function, like nvl(mycolumn, defaul-value)
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Bookmarks