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 |
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2014-02-06 : 01:40:32
|
is it possible to update from select statement?i did my script which end out need to update.select... into #toUpdate from ...the result from #toUpdate is:update tableA set columnA = ... where .....How can i update the #toUpdateI would like to schedult it instead of doing it manually. |
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2014-02-06 : 03:34:19
|
i tried this but it only will select the result instead of update it.declare @run nvarchar(max)='select * from #toUpdate'exec(@run) |
|
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2014-02-06 : 03:36:16
|
i tried this but it only will select the result instead of update it.declare @run nvarchar(max)='select * from #toUpdate'exec(@run) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-02-06 : 04:12:29
|
can you explain what are you trying to achieve ? KH[spoiler]Time is always against us[/spoiler] |
|
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2014-02-06 : 04:14:09
|
would like to schedult to update the records.update statement will store in a table.how can i execute update statement to update the records. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|