Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help!Delete only some rows

Help!Delete only some rows

From: Josef Teepe <std6673_at_et.fh-osnabrueck.de>
Date: Thu, 14 May 1998 20:16:19 +0200
Message-ID: <355B34F3.969FB4E9@et.fh-osnabrueck.de>


Hello,

i guess i have a very strange problem! An interface is sending data! I write them into a database (table1) with java! After six rows, i have to use the average command and write the datas of the 6 rows into another table (table2).
The avg- and the insert- functions into the other table are working fine!
Now my problem: How can i programm it that the avg- function is only using six rows and not more! And how can i delete the six rows after the average function and the insert command is done? Here is my SQL code:
insert into table2 (column1, column2, column3, column4) select avg(column1),

avg(column2),
avg(column3),
avg(column4)

from diplom.table1
Can i use the SQL language or must i do it in another way? I would be very happy about a solution!

Thanks in advance!!

Josef Teepe Received on Thu May 14 1998 - 13:16:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US