Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1246
| From | "Bob Barrows" <reb01501@NOyahooSPAM.com> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: SQL Cursors |
| Date | 2012-09-04 11:27 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <k2577t$kqr$1@dont-email.me> (permalink) |
| References | <k24s53$1ph$1@news.newsland.it> |
simisa wrote: > Hallo all, > I have a problem to resolv asap...I hope that somebody can help me > > 1 Table called classage > > agent1 10000 value2 1 > agent2 8000 value2 2 > agent3 7500 value2 3 > agent4 1000 value2 4 > ... > > The table is order by rank desc. > I need to update the value2 like this: > > agent1 10000 0 1 > agent2 8000 2000 2 > agent3 7500 500 3 > agent4 1000 6500 4 > > > Is it possible ? > Yes, it is certainly possible. Without cursors. What version of sql server (this is very relevant for this question)? What are the column names and datatypes? What is the primary key of the table? You can best answer the latter two questions by using SSMS (or EM, depending on your sql version) to generate the table-creation DDL script for the table and posting it.
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
SQL Cursors simisa@tiscalinet.it (simisa) - 2012-09-04 14:29 +0200
Re: SQL Cursors "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-09-04 11:27 -0400
Re: SQL Cursors sim <simisa@tiscalinet.it> - 2012-09-05 08:32 +0200
Re: SQL Cursors "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-05 06:18 -0400
Re: SQL Cursors sim <simisa@tiscalinet.it> - 2012-09-05 13:00 +0200
Re: SQL Cursors "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-05 07:45 -0400
Re: SQL Cursors sim <simisa@tiscalinet.it> - 2012-09-05 18:19 +0200
Re: SQL Cursors rja.carnegie@gmail.com - 2012-09-05 15:36 -0700
Re: SQL Cursors "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-05 18:44 -0400
Re: SQL Cursors rja.carnegie@gmail.com - 2012-09-05 16:58 -0700
Re: SQL Cursors Gene Wirchenko <genew@ocis.net> - 2012-09-05 17:23 -0700
Re: SQL Cursors rja.carnegie@gmail.com - 2012-09-06 02:50 -0700
Re: SQL Cursors "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-05 18:44 -0400
Re: SQL Cursors sim <simisa@tiscalinet.it> - 2012-09-06 09:37 +0200
csiph-web