Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ashish Mohanty
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then prepend the table name to the column: table1.created_date.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic