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 -> Re: How make data transfomation faster?

Re: How make data transfomation faster?

From: <grrey_at_mail.ru>
Date: 2 Feb 2006 15:24:16 -0800
Message-ID: <1138922656.849496.293850@o13g2000cwo.googlegroups.com>


>to Robert Klemme

First insert is clear:

insert into stat(User_id,Start_date)
select User_id,Date_time from log
 where kind=1;

To make it easier I should delete canceled starts first, before updateing finished. And this is what I can't find. There should be someting like

delete from stat a
 where exists
(

   select 1 from log
    where User_id=a.user_id

      and date_time>a.start_date
      and kind=3
      and Date_time<
      (
          select min(date_time) from general_log
           where user_id=a.user_id
             and kind=1
             and Date_time>a.date_time
      )

)

but this not allowed becouse of Date_time>a.date_time in second subquery. If you help me with that delete startmend, the same could be done for finished records in some temp table and then combined with stat. So there is just one question about this delete startment. Received on Thu Feb 02 2006 - 17:24:16 CST

Original text of this message

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