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 2,074 of 2,288   
   MM to All   
   How to do UPDATE with GROUP BY   
   08 Apr 05 14:59:13   
   
   From: milica.mihac@ck.htnet.hr   
      
   I'm using Oracle database.   
      
   It is true that I can't use update when I have group by ?   
      
   For example I tried with:   
      
   update (select  t1.ID, sum(t1.quantity) as quantity, max(t2.out) as out   
   from t1, t2   
      
   where   
      
         t1.id=t2.ID and   
         GROUP BY s01.sklbr) temp   
      
   set tem.out=temp.out- temp.quantity   
      
      
      
   And get error:ORA:01732 "Data manipulation operation not legal on this view"   
      
      
      
   I suppose that I can do with procedure and cursor but I don't know how. Can   
   anybody help me?   
      
      
      
   Thanks a lot MM   
      
   --- 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