篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql Meta Sherlock决赛相关的知识,希望对你有一定的参考价值。
select * from meta_sherlock_review order by global_total desc
---- Query daily results -------------------------------------------------------------------------------------------------------------------------
select * from meta_sherlock_summary where trunc(dt_matched) = trunc(sysdate) and t_name = 'AGM' and sherlock_score < 90 order by sherlock_score -- Anvil Global Match
select * from meta_sherlock_summary where trunc(dt_matched) = trunc(sysdate) and t_name = 'ALM' and sherlock_score < 90 order by sherlock_score -- Anvil Logic Match
---- update -------------------------------------------------------------------------------------------------------------------------
begin
meta_sherlock_global_eur('ESS');
meta_sherlock_logic_eur('ESS');
end;
---- Query daily results -------------------------------------------------------------------------------------------------------------------------
select * from meta_sherlock_summary order by sherlock_score
select * from meta_sherlock_summary where t_name = 'AGM' order by sherlock_score -- Anvil Global Match
select * from meta_sherlock_summary where t_name = 'ALM' order by sherlock_score -- Anvil Logic Match
select * from meta_sherlock_summary where t_name = 'ZGM' order by sherlock_score -- Archive Global Match
select * from meta_sherlock_summary where t_name = 'ZLM' order by sherlock_score -- Archive Logic Match
---- declare -------------------------------------------------------------------------------------------------------------------------
declare
vErrorCode number;
cursor countryCursor is
select * from meta_sherlock_review order by global_total desc;
inrec countryCursor%rowtype;
begin
if not countryCursor%isopen then
open countryCursor;
end if;
fetch countryCursor into inrec;
while countryCursor%found
loop
begin
meta_sherlock_global_eur(inrec.global_country);
meta_sherlock_logic_eur(inrec.logic_country);
exception
when others then
vErrorCode := 0;
end;
fetch countryCursor into inrec;
end loop;
close countryCursor;
exception
when others then
vErrorCode := 0;
end;
update anvil set dt_phonetics_built = sysdate
where anvil.ctl_source = 'T'
and anvil.ctl_status = 'E'
and anvil.name_only is null
and anvil.dt_phonetics_built is null
and anvil.drvd_u_country in ('PLL', 'TRT', 'FIU', 'DED', 'BEF', 'SKQ', 'PTP')
and anvil.sap_i_busgrp != 'AUTOMOTIVE'
and compare_strings(anvil.product_name,'TDD') = 'FALSE'