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 |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2005-12-12 : 13:44:48
|
| How can I update in an specified order like updating an transactions based on the created date.Example :-Table 1--------Emp_id create_date amount due_date description 123 12/10/2005 200 test 123 12/11/2005 300 12/30/2005 123 12/12/2005 500Table 2---------Emp_id create_date amount due_date description 123 12/09/2005 100 12/25/2005 CheckHere when I update table2 with the table1 contents it should update based on the create date basically update records sequentially on the create date and results should be likeTable 2---------Emp_id create_date amount due_date description 123 12/12/2005 500 12/30/2005 test |
|
|
druer
Constraint Violating Yak Guru
314 Posts |
Posted - 2005-12-12 : 13:58:23
|
| update tableset field = new valuewhere table.datefile < date criteriaUpdate Table2set table2.Field = table1.FieldValuefrom Table2 inner join Table1 on Table1.KeyField = Table2.KeyFieldwhere Table1.field = desired value |
 |
|
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2005-12-12 : 14:02:51
|
| Update Table2set table2.Field = table1.FieldValuefrom Table2 inner join Table1 on Table1.KeyField = Table2.KeyFieldwhere Table1.field = desired valueHow will this update the records starting from 12/10/2005 through 12/12/2005 in order |
 |
|
|
|
|
|