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 |
|
Sprinjee
Starting Member
42 Posts |
Posted - 2006-05-30 : 16:11:06
|
| This is probably a longshot, and against any sql practice...but anyway...is it possblie to perform an update query which add 1 to an interger columnFor instance:current content of table:Col1 Col2Score 4update table set col2 = + 1 where col1 = scoreThe result I would wish for is:Col1 Col2Score 5(without selecting the currect content as a variable first) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-05-30 : 16:15:10
|
| update table set col2 = col2 + 1where col1 = 'score'Tara Kizeraka tduggan |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-05-30 : 16:16:11
|
| UPDATE TableSET Col2 = Col2 + 1WHERE Col1 = 'Score' |
 |
|
|
Sprinjee
Starting Member
42 Posts |
Posted - 2006-05-30 : 16:18:00
|
Bit embarrassed ...sometimes solutions are simpleWorks like a charm thx for the quick reply |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-05-31 : 01:20:29
|
quote: Originally posted by Sprinjee Bit embarrassed ...sometimes solutions are simple
Its happense somtime simple stuff doenst click fast.. If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-31 : 02:36:54
|
>>set col2 = + 1 Dont try client side coding in SQL MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|