This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create or replace function FGetArticleReward (p_aid Z_ARTICLE.AID%type) return int as | |
| cursor c_rank is select Z_YEAR_FIELD_JOURNAL.RANKING from Z_ARTICLE | |
| join Z_JOURNAL on Z_ARTICLE.JID = Z_JOURNAL.JID | |
| join Z_YEAR_FIELD_JOURNAL on Z_JOURNAL.JID = Z_YEAR_FIELD_JOURNAL.JID | |
| where AID = p_aid; | |
| v_ostrava int := 0; | |
| v_brno int := 0; | |
| v_reward int := 0; | |
| begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create or replace function FWeightArticleCount(p_iid Z_INSTITUTION.IID%type) return float as | |
| cursor c_articles is select distinct Z_ARTICLE.AID, Z_ARTICLE.YEAR from Z_INSTITUTION | |
| join Z_ARTICLE_INSTITUTION on Z_INSTITUTION.IID = Z_ARTICLE_INSTITUTION.IID | |
| join Z_ARTICLE on Z_ARTICLE_INSTITUTION.AID = Z_ARTICLE.AID | |
| where Z_INSTITUTION.IID = p_iid; | |
| v_sum FLOAT := 0; | |
| v_inst Z_INSTITUTION%rowtype; | |
| v_current_year NUMBER := EXTRACT(YEAR FROM SYSDATE); | |
| v_article_count int; | |
| begin |