Q
Manage Learn to apply best practices and optimize your operations.

How to separate records in Oracle tables according to date

Read this tip in which Oracle expert Brian Peasland explains whether you can separate records from before a certain date in an Oracle table.

I'm working with an Oracle table and I'm trying to separate out old records from the table. For example, I have a table named employee where columns are emp_code and emp_name. Suppose that this table has been functioning for seven years and now I want to separate the records which are either insert or update before 2005.

In summary, I want to find which data is before 2005 and which is after 2005. How can I accomplish this?

The difficulty will be in determining which records were added before 2005 and which ones occurred after that date. By default, Oracle does not keep track of this information for you. Is there some column value that can help with this determination like HIRE_DATE? If not, you won't be able to make this determination.
This was last published in December 2008

Dig Deeper on Oracle database administration

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close