Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update query not listening?
Message
 
 
To
13/08/2003 14:13:26
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00819873
Message ID:
00819880
Views:
11
Darren,

You can make order_seq IDENTITY column and SQL Server will do numbering for you. In your UPDATE command select on the right of '=' excutes only ones at the beginning of the query not for every row because it isn't correlated subquery.

>Can someone tell me why this simple command doesn't work?
>
>update #d2
>set order_seq=(select isnull(max(order_seq),0)+1 from #d2)
>
>All I want it to do is number order_seq 1,2,3 etc. but they all get a 1 (They are all 0 to start with).
>
>Thanks.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform