Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How make data transfomation faster?
>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