Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-10-08 : 10:34:52
|
| Dear All,I need to maintain the History of records in one table from another table.Here there can be multiple records for the same Date.But i need to insert the latest one records to History table.Can u pls tell me how can we do this ? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-08 : 10:48:53
|
| Until you give more informationsinsert into history_table(columns)select columns from original_table where date=(select max(date) from original_table)MadhivananFailing to plan is Planning to fail |
 |
|
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-10-08 : 11:26:22
|
| Here is the details.The main table holds the data for 5 days after the it get purged.So i need to store these table details in History table.It has the same structure as the main table.Also it should be stored procedure to run as Schedule job after completion of getting values to main table.Pls help |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-09 : 01:50:19
|
| Did you try what I suggested?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|