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 |
jylland
Starting Member
27 Posts |
Posted - 2013-12-09 : 16:38:20
|
can anybody help me ?I have two tables (tableA) and (TableB) in the same databaseI plan a scheduled task every monday, it will take data from tableA and update TableB with them.there are only 3 id's in every table, and the id rows in both tables is 1, 2 and 3.TableAid name1 kay2 bo3 johnNeXT mondaythe scheduled most update TableB with the data from TableAso TableB after the scheduled executed look like thisid name1 kay2 bo3 johnIn the week after tableA will be updated with 3 new names, and the scheduled will NeXT monday again update TableB with this 3 names.So there are always only 3 names. and every monday the scheduled will run.How can I make a sql statement to update tableB with the data from tableA ?? |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-12-09 : 18:47:42
|
[code]update bset name = a.namefrom tablea a inner join tableb b on a.id = b.id[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
jylland
Starting Member
27 Posts |
Posted - 2013-12-10 : 12:47:53
|
great |
|
|
|
|
|