home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,733 of 19,505   
   Bob Barrows to simisa   
   Re: SQL Cursors   
   04 Sep 12 11:27:18   
   
   From: reb01501@NOyahooSPAM.com   
      
   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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca