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 17,793 of 19,505   
   Gert-Jan Strik to Faye   
   Re: Insert and Delete   
   17 Apr 10 23:10:25   
   
   c56905dd   
   From: sorrytoomuchspamalready@xs4all.nl   
      
   There is no rule that says that you cannot update the Primary Key.   
      
   Have you tried Plamen's query? What was the error message?   
      
   --   
   Gert-Jan   
      
      
   Faye wrote:   
   >   
   > salesman is the primary key. It can not be updated.   
   >   
   > On Apr 15, 5:00 pm, Plamen Ratchev  wrote:   
   > > Not sure what you need, but try this (make sure to try on test data not   
   directly on production):   
   > >   
   > > UPDATE Tables   
   > > SET salesman = 30   
   > > WHERE salesman = 25   
   > >    AND customer IN ('Jeff', 'Kory', 'Jean');   
   > >   
   > > If you need to update all customers, then this:   
   > >   
   > > UPDATE Tables   
   > > SET salesman = 30   
   > > WHERE salesman = 25;   
   > >   
   > > --   
   > > Plamen Ratchevhttp://www.SQLStudio.com   
      
   --- 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