Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Help with cursor and fetch command!
hello,
Please can you help me!!
I' m using oracle 7.3. I have two tables with the same columns. Table1
is getting datas from an interface six times an hour. I want to average
this six rows to one row of an hour and insert this row to table2. When
that is done table1 has to be deleted, so that in the future the table
is not going to be too big.
Important is that that is done by the database itsself!!
Can You help me to finishing my code. It is now only an SQL code,
because i' m a beginner in PL/SQL.
code:
DECLARE cursor c_data IS
select avg(column1),
avg(column2), avg(column3), avg(column4), avg(column5), avg(column6), avg(column7), avg(column8), avg(column9), avg(column10), avg(column11), avg(column12), avg(column13)
OPEN c_data; LOOP FETCH c_data INTO josef.table2(column1, column2, column3,column4, column5, column6, column7, column8, column9, column10, column11, column12, column13);
Josef Received on Mon May 18 1998 - 14:56:03 CDT
![]() |
![]() |