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 |
|
ThreePea
Yak Posting Veteran
83 Posts |
Posted - 2002-04-15 : 11:46:13
|
I just read the following article: [url]http://www.sqlteam.com/item.asp?ItemID=765[/url]Basically it talks about the new feature in the UPDATE statement that allows you to do something like<br>UPDATE tableSET @var = column = @var + 1 I understand the concept - it's a cool way to sequentially renumber a field. However, I was able to do the same thing with the following:UPDATE tableSET column = @var,@var = @var + 1 What am I missing that makes this nice tip something that couldn't be done before. Thanks.Jerry======================================================="You guys start coding - I'll go find out what they want." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-04-15 : 11:54:08
|
| I had the same problem when I tried altering it. It seems that syntax is very particular, and it has to be done as described in the article.Technically you cannot assign a variable while setting or selecting a column value; that syntax is the only acceptable format that works around that limitation. |
 |
|
|
|
|
|