Delimiter $$
/**
 * Author:  armen
 * Created: 21 juin 2018
 */
--  EntriesRefs
Drop Procedure if Exists BUSINESS_COMPUTE_PUBLICVIEWS_ENTRIES_REFS $$
Create Procedure BUSINESS_COMPUTE_PUBLICVIEWS_ENTRIES_REFS ()
Begin
    Truncate Table TMP_V_PUBLIC_ENTRIES_REFS_VIEW;

    Insert Into TMP_V_PUBLIC_ENTRIES_REFS_VIEW (
        ENTRIES_ID_ENTRIES
        , ENTRIES_REF_CODE_1
        , ENTRIES_REF_CODE_2
        , ENTRIES_REF_CODE_3
        , ENTRIES_REF_CODE_4
        , ENTRIES_REF_CODE_5
        , ENTRIES_REF_CODE_6
        , ENTRIES_REF_CODE_7
        , ENTRIES_REF_CODE_8
        , ENTRIES_REF_CODE_9
        , ENTRIES_REF_CODE_10
        , ENTRIES_ACCRED_REF_CODE_1
        , ENTRIES_ACCRED_REF_CODE_2
        , ENTRIES_ACCRED_REF_CODE_3
        , ENTRIES_ACCRED_REF_CODE_4
        , ENTRIES_ACCRED_REF_CODE_5
    )
    Select 
        ENTRIES_ID_ENTRIES
        , ENTRIES_REF_CODE_1
        , ENTRIES_REF_CODE_2
        , ENTRIES_REF_CODE_3
        , ENTRIES_REF_CODE_4
        , ENTRIES_REF_CODE_5
        , ENTRIES_REF_CODE_6
        , ENTRIES_REF_CODE_7
        , ENTRIES_REF_CODE_8
        , ENTRIES_REF_CODE_9
        , ENTRIES_REF_CODE_10
        , ENTRIES_ACCRED_REF_CODE_1
        , ENTRIES_ACCRED_REF_CODE_2
        , ENTRIES_ACCRED_REF_CODE_3
        , ENTRIES_ACCRED_REF_CODE_4
        , ENTRIES_ACCRED_REF_CODE_5
    From V_PUBLIC_ENTRIES_REFS_VIEW ;
End $$
Delimiter ;

