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 |
|
dewacorp.alliances
452 Posts |
Posted - 2003-04-16 : 18:50:39
|
| Hi thereI had 2 tables whihc have a strcutrue similar like this:Table 1:ChargeCode, VARCHAR(8)AccNo, VARCHAR(5)BudgetJuly MONEYBudgetAugust MONEYBudgetDecember MONEYBudgetPriorYear MONEYTable 2:ChargeCode, VARCHAR(8)AccNo, VARCHAR(5)BudgetPriorYear MONEYI want to update the BudgetPriorYear on "TABLE 1" using the data of BudgetPriorYear of "TABLE 2" and this based on ChargeCode AND AccNO of these 2 tables.Any help that will be great.Thanks. |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-04-16 : 19:31:36
|
| UPDATE ASET A.BudgetPriorYear = B.BudgetPriorYearFROM Table1 AINNER JOIN Table2 Bon B.ChargeCode=A.ChargeCode and B.AccNo=A.AccNoI haven't tried it. Let me know if it works.Sam |
 |
|
|
|
|
|