Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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  RSS feed

 
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
Posts: 21048
85
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
Boost this thread!