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 19,202 of 19,505    |
|    =?ISO-8859-1?Q?Jessica_Gonz=E1lez?= to All    |
|    Re: WHILE LOOP AS FOR LOOP    |
|    29 Jul 15 07:31:23    |
   
   From: jess.rgm@gmail.com   
      
   thanks.. but   
      
   SET IDENTITY_INSERT table ON;   
   INSERT INTO table(pk,activo,permiso,rol)   
    SELECT IDENT_CURRENT('table')+1,'S',id, 1   
    FROM table2   
      
      
   return error   
      
   Violation of PRIMARY KEY constraint 'PK__table__3213E83F2B947552'. Cannot   
   insert duplicate key in object 'table'. The duplicate key value is (6).   
      
   only 'id' i need get from table2   
      
   --- 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