Home > Archive > Oracle Database discussion > April 2005 > How to do UPDATE with GROUP BY









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to do UPDATE with GROUP BY
MM

2005-04-09, 8:23 pm

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




Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com