Delimiter //
/**
 * Author:  armen
 * Created: 12 oct. 2016
 check if contacts ref is not null
**/
Drop Procedure if exists LOADER_MEMBERS_NORMALIZE_CONTACT_REF_NOT_NULL //
Create Procedure LOADER_MEMBERS_NORMALIZE_CONTACT_REF_NOT_NULL (
    In batchnum int
)
Begin
    Set @flagCountField='LOADER_MEMBERS_ERRCOUNT';
    Set @flagMsgField='LOADER_MEMBERS_ERRMSGS';
    Set @lastStatusField=null;
    Set @lastStatus=null;
    Set @checkedFieldName = 'CONTACTS_REF';

    CALL LOADER_CHECK_NULL (
        'LOADER_MEMBERS'
        , @checkedFieldName
        , 'LOADER_MEMBERS_BATCH_NUM'
        , batchnum
        , @flagCountField
        , @flagMsgField
        , @lastStatusField
        , @lastStatus
    );
End //
Delimiter ;