dbTalk Databases Forums  

How to do UPDATE with GROUP BY

comp.databases.oracle comp.databases.oracle


Discuss How to do UPDATE with GROUP BY in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MM
 
Posts: n/a

Default How to do UPDATE with GROUP BY - 04-08-2005 , 07:59 AM






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





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.