 DECLARE `v_defaultLanguage` text;
 SET `v_defaultLanguage`=(SELECT `prefix` FROM `config_language` `cl` JOIN `config_settings` `cs` ON `cl`.`id`=`cs`.`languageId` WHERE `cs`.`id`=1);
 DROP TABLE IF EXISTS `tmp_concept_terms`;
-CREATE TEMPORARY TABLE `tmp_concept_terms` (`conceptId` BIGINT,`type_and_lang` text,`term` text);
+CREATE TEMPORARY TABLE `tmp_concept_terms` (`conceptId` bigint,`type_and_lang` text,`term` text);
 CALL setLanguage(1,`p_langCodeA`);
 INSERT INTO `tmp_concept_terms` (`conceptId`,`type_and_lang`,`term`)
 SELECT `conceptid`,CONCAT('FSN',' ',`p_langCodeA`) `type and lang`,`term` FROM `snap1_fsn` 

DECLARE `v_refine1` text;
DECLARE `v_refine2` text;
DECLARE `v_ref2` text;
DECLARE `v_value1_id` bigint(18);
DECLARE `v_value2_id` bigint(18);
DECLARE `v_attr1_id` bigint(18);
DECLARE `v_attr2_id` bigint(18);
DECLARE `v_value1_symbol` text;
DECLARE `v_value2_symbol` text;
DECLARE `v_pos` int;

CREATE PROCEDURE `setLanguage` (IN `p_id` tinyint, IN `p_lang_code` varchar(5))
BEGIN
-- This procedure sets the language using the language-dialect code (e.g. en-GB etc)
-- This can be applied to any of the numbered views.
IF `p_lang_code`='' THEN 
	SET `p_lang_code`='en-US';
END IF;
UPDATE `config_settings` `s`, `config_language` `l`
	SET `s`.`languageId`=`l`.`id`,
