Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes using JDBC how to move a record from one table to another within specified time limit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "using JDBC how to move a record from one table to another within specified time limit" Watch "using JDBC how to move a record from one table to another within specified time limit" New topic
Author

using JDBC how to move a record from one table to another within specified time limit

Ashish Mohanty
Greenhorn

Joined: Nov 24, 2011
Posts: 5
How to move records from one table to another table using a specified time limit eg:60 days old record should be moved from one table to another table.

Anyone please help me.
Sudheer Bhat
Ranch Hand

Joined: Feb 22, 2011
Posts: 75
The better way to copy records from one to another is . This assumes that your table has a column to store the created date. The syntax might slightly differ from database to database.

Ashish Mohanty
Greenhorn

Joined: Nov 24, 2011
Posts: 5
Sudheer Bhat wrote:The better way to copy records from one to another is . This assumes that your table has a column to store the created date. The syntax might slightly differ from database to database.



But what exactly is the created date.both the table has same column name.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

Then prepend the table name to the column: table1.created_date.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
 
subject: using JDBC how to move a record from one table to another within specified time limit
 
Similar Threads
best way to query and insert into different table
Sql query
moving a selected row from one table to another
reading and writing large data(200000) from oracle
Moving columns between tables