 <?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.lhep.unibe.ch/index.php?action=history&amp;feed=atom&amp;title=Another_mail_from_Cristiano</id>
	<title>Another mail from Cristiano - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.lhep.unibe.ch/index.php?action=history&amp;feed=atom&amp;title=Another_mail_from_Cristiano"/>
	<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Another_mail_from_Cristiano&amp;action=history"/>
	<updated>2026-05-14T01:52:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.lhep.unibe.ch/index.php?title=Another_mail_from_Cristiano&amp;diff=85&amp;oldid=prev</id>
		<title>Lhep: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Another_mail_from_Cristiano&amp;diff=85&amp;oldid=prev"/>
		<updated>2015-03-18T07:49:23Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:49, 18 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Lhep</name></author>
	</entry>
	<entry>
		<id>https://wiki.lhep.unibe.ch/index.php?title=Another_mail_from_Cristiano&amp;diff=84&amp;oldid=prev</id>
		<title>Lhep at 16:11, 22 July 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Another_mail_from_Cristiano&amp;diff=84&amp;oldid=prev"/>
		<updated>2008-07-22T16:11:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear All,&lt;br /&gt;
 &lt;br /&gt;
Luca found another syntax problem in the pp_download_predictions I sent you last week.&lt;br /&gt;
Here is the (hopefully final!) corrected procedure text, provided by him.&lt;br /&gt;
Best regards&lt;br /&gt;
 &lt;br /&gt;
Cristiano&lt;br /&gt;
 &lt;br /&gt;
create or replace procedure pp_download_predictions(i_id_eventbrick integer,&lt;br /&gt;
i_dblink&lt;br /&gt;
varchar2) as&lt;br /&gt;
type typcur is ref cursor;&lt;br /&gt;
pc typcur;&lt;br /&gt;
v_procid integer;&lt;br /&gt;
v_rootid integer;&lt;br /&gt;
begin&lt;br /&gt;
execute immediate &amp;#039;select distinct id_processoperation from tb_cs_candidates@&amp;#039;&lt;br /&gt;
||&lt;br /&gt;
i_dblink || &amp;#039; zb where (zb.id_eventbrick, zb.id) in&lt;br /&gt;
   (select id_eventbrick, id_candidate from tb_cs_candidate_validation@&amp;#039; ||&lt;br /&gt;
i_dblink || &amp;#039; zc where id_eventbrick = &amp;#039; || i_id_eventbrick || &amp;#039; and valid =&lt;br /&gt;
&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;)&amp;#039; into v_rootid;&lt;br /&gt;
v_procid := v_rootid;&lt;br /&gt;
while v_procid is not NULL loop&lt;br /&gt;
  v_rootid := v_procid;&lt;br /&gt;
  execute immediate &amp;#039;select id_parent_operation from tb_proc_operations@&amp;#039; ||&lt;br /&gt;
i_dblink || &amp;#039; where id = &amp;#039; || v_rootid into v_procid;&lt;br /&gt;
end loop;&lt;br /&gt;
dbms_output.put_line(&amp;#039;ROOT: &amp;#039; || v_rootid);&lt;br /&gt;
&lt;br /&gt;
execute immediate &amp;#039;insert into tb_eventbricks (select * from tb_eventbricks@&amp;#039;&lt;br /&gt;
||&lt;br /&gt;
i_dblink || &amp;#039; where id = &amp;#039; || i_id_eventbrick || &amp;#039;)&amp;#039;;&lt;br /&gt;
execute immediate &amp;#039;insert into tb_plates (select * from tb_plates@&amp;#039; || i_dblink&lt;br /&gt;
||&lt;br /&gt;
&amp;#039; where id_eventbrick = &amp;#039; || i_id_eventbrick || &amp;#039;)&amp;#039;;&lt;br /&gt;
execute immediate &amp;#039;insert into tb_templatemarksets (select * from&lt;br /&gt;
tb_templatemarksets@&amp;#039; || i_dblink || &amp;#039; where id_eventbrick = &amp;#039; ||&lt;br /&gt;
i_id_eventbrick || &amp;#039;)&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
open pc for &amp;#039;select id from tb_proc_operations@&amp;#039; || i_dblink || &amp;#039; connect by&lt;br /&gt;
id_parent_operation = prior id start with id = &amp;#039; || v_rootid;&lt;br /&gt;
loop&lt;br /&gt;
  fetch pc into v_procid;&lt;br /&gt;
  exit when pc%notfound;&lt;br /&gt;
  dbms_output.put_line(&amp;#039;PROCOP: &amp;#039; || v_procid);&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_proc_operations (select * from&lt;br /&gt;
tb_proc_operations@&amp;#039; || i_dblink || &amp;#039; where id = &amp;#039; || v_procid || &amp;#039;)&amp;#039;;&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_proc_operations (select * from&lt;br /&gt;
tb_proc_operations@&amp;#039; || i_dblink || &amp;#039; p where id in (select id_processoperation&lt;br /&gt;
from tb_predicted_events@&amp;#039; || i_dblink || &amp;#039; where id in (select id_event from&lt;br /&gt;
tb_cs_candidates@&amp;#039; || i_dblink || &amp;#039; ca where id_eventbrick = &amp;#039; ||&lt;br /&gt;
i_id_eventbrick&lt;br /&gt;
|| &amp;#039; and id_processoperation = &amp;#039; || v_procid || &amp;#039; and exists (select * from&lt;br /&gt;
tb_cs_candidate_validation@&amp;#039; || i_dblink || &amp;#039; cb where ca.id_eventbrick =&lt;br /&gt;
cb.id_eventbrick and ca.id = cb.id_candidate and cb.VALID = &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;))) and not&lt;br /&gt;
exists (select * from tb_proc_operations q where p.id = q.id)  )&amp;#039;;&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_predicted_events (select * from&lt;br /&gt;
tb_predicted_events@&amp;#039; || i_dblink || &amp;#039; where id in (select id_event from&lt;br /&gt;
tb_cs_candidates@&amp;#039; || i_dblink || &amp;#039; ca where id_eventbrick = &amp;#039; ||&lt;br /&gt;
i_id_eventbrick&lt;br /&gt;
|| &amp;#039; and id_processoperation = &amp;#039; || v_procid || &amp;#039; and exists (select * from&lt;br /&gt;
tb_cs_candidate_validation@&amp;#039; || i_dblink || &amp;#039; cb where ca.id_eventbrick =&lt;br /&gt;
cb.id_eventbrick and ca.id = cb.id_candidate and cb.VALID = &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;)))&amp;#039;;&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_predicted_tracks (select * from&lt;br /&gt;
tb_predicted_tracks@&amp;#039; || i_dblink || &amp;#039; where id_event in (select id_event from&lt;br /&gt;
tb_cs_candidates@&amp;#039; || i_dblink || &amp;#039; ca where id_eventbrick = &amp;#039; ||&lt;br /&gt;
i_id_eventbrick&lt;br /&gt;
|| &amp;#039; and id_processoperation = &amp;#039; || v_procid || &amp;#039; and exists (select * from&lt;br /&gt;
tb_cs_candidate_validation@&amp;#039; || i_dblink || &amp;#039; cb where ca.id_eventbrick =&lt;br /&gt;
cb.id_eventbrick and ca.id = cb.id_candidate and cb.VALID = &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;)))&amp;#039;;&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_cs_candidates (select * from&lt;br /&gt;
tb_cs_candidates@&amp;#039;&lt;br /&gt;
|| i_dblink || &amp;#039; ca where id_eventbrick = &amp;#039; || i_id_eventbrick || &amp;#039;and&lt;br /&gt;
id_processoperation = &amp;#039; || v_procid || &amp;#039; and exists (select * from&lt;br /&gt;
tb_cs_candidate_validation@&amp;#039; || i_dblink || &amp;#039; cb where ca.id_eventbrick =&lt;br /&gt;
cb.id_eventbrick and ca.id = cb.id_candidate and cb.VALID = &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;))&amp;#039;;&lt;br /&gt;
end loop;&lt;br /&gt;
close pc;&lt;br /&gt;
&lt;br /&gt;
open pc for &amp;#039;select id from tb_proc_operations connect by id_parent_operation =&lt;br /&gt;
prior id start with id = &amp;#039; || v_rootid;&lt;br /&gt;
loop&lt;br /&gt;
  fetch pc into v_procid;&lt;br /&gt;
  exit when pc%notfound;&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_zones (select * from tb_zones@&amp;#039; || i_dblink&lt;br /&gt;
||&lt;br /&gt;
&amp;#039; p where id_eventbrick = &amp;#039; || i_id_eventbrick || &amp;#039; and id_processoperation = &amp;#039;&lt;br /&gt;
||&lt;br /&gt;
v_procid || &amp;#039; and exists (select * from tb_cs_candidate_tracks@&amp;#039; || i_dblink ||&lt;br /&gt;
&amp;#039;&lt;br /&gt;
q where p.id_eventbrick = q.id_eventbrick and p.id = q.id_zone))&amp;#039;;&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_views (select * from tb_views@&amp;#039; || i_dblink&lt;br /&gt;
||&lt;br /&gt;
&amp;#039; p where (id_eventbrick, id_zone) in (select id_eventbrick, id from tb_zones&lt;br /&gt;
where id_eventbrick = &amp;#039; || i_id_eventbrick || &amp;#039; and id_processoperation = &amp;#039; ||&lt;br /&gt;
v_procid || &amp;#039;))&amp;#039;;&lt;br /&gt;
end loop;&lt;br /&gt;
close pc;&lt;br /&gt;
&lt;br /&gt;
open pc for &amp;#039;select id from tb_proc_operations connect by id_parent_operation =&lt;br /&gt;
prior id start with id = &amp;#039; || v_rootid;&lt;br /&gt;
loop&lt;br /&gt;
  fetch pc into v_procid;&lt;br /&gt;
  exit when pc%notfound;&lt;br /&gt;
  execute immediate &amp;#039;insert into tb_mipmicrotracks (select * from&lt;br /&gt;
tb_mipmicrotracks@&amp;#039; || i_dblink || &amp;#039; where (id_eventbrick, id_zone, side, id)&lt;br /&gt;
in&lt;br /&gt;
(select id_eventbrick, id_zone, side, id_microtrack from&lt;br /&gt;
tb_cs_candidate_tracks@&amp;#039;&lt;br /&gt;
|| i_dblink || &amp;#039; where (id_eventbrick, id_candidate) in (select id_eventbrick,&lt;br /&gt;
id&lt;br /&gt;
from tb_cs_candidates where id_eventbrick = &amp;#039; || i_id_eventbrick || &amp;#039; and&lt;br /&gt;
id_processoperation = &amp;#039; || v_procid || &amp;#039;)))&amp;#039;;&lt;br /&gt;
end loop;&lt;br /&gt;
close pc;&lt;br /&gt;
&lt;br /&gt;
open pc for &amp;#039;select id from tb_proc_operations connect by id_parent_operation =&lt;br /&gt;
prior id start with id = &amp;#039; || v_rootid;&lt;br /&gt;
loop&lt;br /&gt;
  fetch pc into v_procid;&lt;br /&gt;
  exit when pc%notfound;&lt;br /&gt;
   execute immediate &amp;#039;insert into tb_cs_candidate_tracks (select * from&lt;br /&gt;
tb_cs_candidate_tracks@&amp;#039; || i_dblink || &amp;#039; where (id_eventbrick, id_candidate)&lt;br /&gt;
in&lt;br /&gt;
(select id_eventbrick, id from tb_cs_candidates where id_eventbrick = &amp;#039; ||&lt;br /&gt;
i_id_eventbrick || &amp;#039; and id_processoperation = &amp;#039; || v_procid || &amp;#039;))&amp;#039;;&lt;br /&gt;
   execute immediate &amp;#039;insert into tb_cs_candidate_checks (select * from&lt;br /&gt;
tb_cs_candidate_checks@&amp;#039; || i_dblink || &amp;#039; where (id_eventbrick, id_candidate)&lt;br /&gt;
in&lt;br /&gt;
(select id_eventbrick, id from tb_cs_candidates where id_eventbrick = &amp;#039; ||&lt;br /&gt;
i_id_eventbrick || &amp;#039; and id_processoperation = &amp;#039; || v_procid || &amp;#039;))&amp;#039;;&lt;br /&gt;
end loop;&lt;br /&gt;
close pc;&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lhep</name></author>
	</entry>
</feed>