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 |
|
pras2007
Posting Yak Master
216 Posts |
Posted - 2009-10-14 : 21:56:36
|
| Hello All,I have a table that I want to insert the values into another table. The problem is that I want to change the signs in the result table. Does anyone know if there is a function that can change the signs automatically during insert operation?Table_A COL1 COL2 COL310 30 -2939 -23 45 Result COL1 COL2 COL3-10 -30 29-39 23 -45Please advice. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-10-14 : 22:08:54
|
[code]select -COL1, -COL2, -COL3from yourtable[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
pras2007
Posting Yak Master
216 Posts |
Posted - 2009-10-14 : 22:42:50
|
| Thanks for the response Khtan, I can also multiple the col by -1 to accomplish the task. |
 |
|
|
|
|
|