Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help!Delete only some rows
Use some third temp table with the same sructure as table1 has.
By useing of on insert trigger put each row into table3. When count(*) in
table 3 = 6 put average data into table2 and delete all rows in table 3.
Slava.
Josef Teepe <std6673_at_et.fh-osnabrueck.de> wrote in article
<355B34F3.969FB4E9_at_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 Tue May 19 1998 - 16:33:54 CDT