home bbs files messages ]

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

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

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

   Message 1,306 of 2,288   
   .com to Dariusz Tomon   
   Re: procedure for numering records - no    
   19 Apr 04 06:13:46   
   
   From: mcstockX@Xenquery   
      
   "Dariusz Tomon"  wrote in message   
   news:c7c595.0404190210.2d530073@posting.google.com...   
   | Hi   
   |   
   | I'm trying to add numers to "id" field in my "kadry" table. I write   
   | procedure to do it (as follows) but running this procedure does make   
   | no effect.   
   | Where is bug?   
   | best regards   
   |   
   | D.T.   
   |   
   | PROCEDURE KADRY_PROC_SEQ2   
   | IS   
   | BEGIN   
   | declare   
   | i number;   
   | k number;   
   | nazwisko varchar2(40);   
   | cursor cur1 IS   
   | select * from kadry;   
   | BEGIN   
   | k:=1;   
   | for c1 IN cur1   
   | loop   
   | c1.id:=k;   
   | k:=k+1;   
   | end loop;   
   | commit;   
   | end;   
   | END;   
      
      
   welcome to SQL ;-)   
      
   this code only reads the KADRY table and resets a variable in memory -- if   
   you want to change a value in the database you need to use an UPDATE   
   statement   
      
   -{ mcs   
      
   --- 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