Delimiter //
/**
check if ENTITIES_REF_SEQUENCE is not null
**/
Drop Procedure if exists LOADER_REFDATALABEL_NORMALIZE_MAP_LANGUAGE_NOT_PROVIDED //
Create Procedure LOADER_REFDATALABEL_NORMALIZE_MAP_LANGUAGE_NOT_PROVIDED (
    In batchnum int
)
Begin
	call LOADER_BUILD_REFDATALABEL_CHECK_BASE_QUERY (
				'DF_LANGUAGES_CODE', batchnum, 'Code langue inexistant', '', 0, @query
			)
		;
	set @query = Concat(@query
					, ' And DF_LANGUAGES_ID_DF_LANGUAGES Is Null '
				)
			;

	PREPARE stmt FROM @query;
	execute stmt			
		;
	Deallocate prepare stmt;



--     Set @flagCountField='LOADER_REFDATALABEL_ERRCOUNT';
--     Set @flagMsgField='LOADER_REFDATALABEL_ERRMSGS';
--     Set @lastStatusField=null;
--     Set @lastStatus=null;
--     Set @checkedFieldName = 'DF_LANGUAGES_ID_DF_LANGUAGES';
-- 
--     CALL LOADER_CHECK_NULL (
--         'LOADER_REFDATALABEL'
--         , @checkedFieldName
--         , 'LOADER_REFDATALABEL_BATCH_NUM'
--         , batchnum
--         , @flagCountField
--         , @flagMsgField
--         , @lastStatusField
--         , @lastStatus
--     );
End //
Delimiter ;