SET ANSI_NULLS ON
SET ANSI_PADDING ON;
SET QUOTED_IDENTIFIER ON
go

--!!! ATTENTION !!!
--if it the first installation, please fill FA_MROS_INT_PERS_CHARGE before the patch installation
--you can fill the following variables manually or leave them empty for automatic installation
----------------------------------------------------------------------------------------------
--Please, fill the following constants for manual installation:
declare @F_BANK_ID int;            --use Bank's ID
declare @Version varchar(10);      --please fill it with 'CH' for Switzerland and 'LI' for Lichtenshtein if it is the first installation for the bank
----------------------------------------------------------------------------------------------

declare @ii int;
declare @nn int;
declare @Ver varchar(10);
declare @Ver1 varchar(10);
declare @code varchar(250);
set @code = FAF.GoAML_get_package_version();
set @nn = (select count(*) from FAF.FA_MROS_INT_PERS_CHARGE);
if @F_BANK_ID is not null
	begin
		set @nn=1;
		print('Manual installation');
	end;
else 
	print('Automatic installation');

if @nn=0
begin
	raiserror('You have to fill FA_MROS_INT_PERS_CHARGE before the patch installation',10,1);
	return;
end;

set @ii = 1
while @ii<=@nn
begin
	if @F_BANK_ID is null
	begin
		select @F_BANK_ID=userbk_nr_home,@Ver1=ver 
		from 
			(select userbk_nr_home,substring(swift,5,2) as ver,
				row_number() over (order by userbk_nr_home) as rn
			from faf.FA_MROS_INT_PERS_CHARGE) s
		where rn=@ii;
	end;

	if @F_BANK_ID is not null
	begin
		set @Ver = FAF.GoAML_get_country(@F_BANK_ID);
		if isnull(@Version,'') not in ('LI','CH')
		begin
			if @Ver in ('LI','CH')
				set @Version = @Ver;
			else
				set @Version = @Ver1;
		end;

		if @Version in ('LI','CH')
			begin
				--scheme definition
				declare @scheme varchar(250);
				if @Version='LI'
					set @scheme = '5.0.2';
				if @Version='CH'
					set @scheme = '5.0.2';

				--special table for transaction description
				IF (select count(*) from [FAF].[FA_MROS_TRANSACTION_DESCR] where userbk_nr=@F_BANK_ID)=0
				begin
					insert FAF.FA_MROS_TRANSACTION_DESCR (userbk_nr,key_cd,priority_cd,transaction_description,debit_text,credit_text,comments) values 
						(@F_BANK_ID,10,0,'Zahlung','Ausgang','Eingang','Default text for payments from ZV_ZLG_T'),
						(@F_BANK_ID,20,10,'Übertrag','Ausgang','Eingang','Internal payments from ZV_ZLG_T'),
						(@F_BANK_ID,30,20,'Postzahlung','Ausgang','Eingang','Postal payments from ZV_ZLG_T (gf_nr = 211)'),
						(@F_BANK_ID,40,40,'Post Bareinzahlung','','Eingang','Postal cash payments from ZV_ZLG_T (om_auf_empf_cd = PE,PG)'),
						(@F_BANK_ID,50,50,'Kartenzahlung','Ausgang','Eingang','Card transactions from ZV_ZLG_T (trak_cd_e = DTB,KTB)'),
						(@F_BANK_ID,60,90,'TWINT','','Eingang','TWINT payments from ZV_ZLG_T (om_auf_empf_cd = TG)'),
						(@F_BANK_ID,70,80,'TWINT','Ausgang','','TWINT payments from ZV_ZLG_T (om_auf_empf_cd = TB)'),
						(@F_BANK_ID,80,30,'ESR','Ausgang','Eingang','ESR payments from ZV_ZLG_T (esr_ref_nr is not NULL)'),
						(@F_BANK_ID,90,70,'Kartenzahlung','Ausgang','Eingang','Card transactions from ZV_ZLG_T (special_mark = card_operation,card_purchase)'),
						(@F_BANK_ID,100,60,'Kartenzahlung','Ausgang','Eingang','Card transactions from ZV_ZLG_T (card_art_nr corresponds to special_mark = BANKCARD)'),
						(@F_BANK_ID,500,0,'<comments>','Auszahlung','Einzahlung','Default text for transactions from KT_BUCH_EA'),
						(@F_BANK_ID,510,50,'Bartransaktion','Auszahlung','Einzahlung','Cash transactions from KT_BUCH_EA (special_mark = cash_operation)'),
						(@F_BANK_ID,520,60,'Bancomat','Bezug','Einzahlung','ATM transactions from KT_BUCH_EA (special_mark = card_operation)'),
						(@F_BANK_ID,530,40,'Bartransaktion','','Einzahlung','Cash transactions from KT_BUCH_EA (special_mark = deposit)'),
						(@F_BANK_ID,540,30,'Bartransaktion','Auszahlung','','Cash transactions from KT_BUCH_EA (special_mark = withdrawal)'),
						(@F_BANK_ID,550,20,'Kartenzahlung','Ausgang','Eingang','Card transactions from KT_BUCH_EA (special_mark = card_purchase)'),
						(@F_BANK_ID,560,70,'Bartransaktion','','Einzahlung','Deposit to strangers account from KT_BUCH_EA (adr_zeile_1_ez is not NULL)'),
						(@F_BANK_ID,570,10,'<special_mark>','Ausgang','Eingang','custom special_mark from KT_BUCH_EA (special_mark is not empty and not in the list of predefined values)');
				end;

				--technical dictionaries
				if @version='CH'
				begin
					delete from FAF.FA_MROS_INT_WRG where userbk_nr=@F_BANK_ID;
					insert into FAF.FA_MROS_INT_WRG (userbk_nr,iso_wrg_cd) values (@F_Bank_ID,'-'), (@F_Bank_ID,'AED'), (@F_Bank_ID,'AFN'), (@F_Bank_ID,'ALL'), (@F_Bank_ID,'AMD'), (@F_Bank_ID,'ANG'), (@F_Bank_ID,'AOA'), (@F_Bank_ID,'AOK'), (@F_Bank_ID,'ARS'), (@F_Bank_ID,'AUD'), (@F_Bank_ID,'AWG'), (@F_Bank_ID,'AZN'), (@F_Bank_ID,'BAM'), (@F_Bank_ID,'BBD'), (@F_Bank_ID,'BDT'), (@F_Bank_ID,'BEC'), (@F_Bank_ID,'BEL'), (@F_Bank_ID,'BGN'), (@F_Bank_ID,'BHD'), (@F_Bank_ID,'BIF'), (@F_Bank_ID,'BMD'), (@F_Bank_ID,'BND'), (@F_Bank_ID,'BOB'), (@F_Bank_ID,'BRL'), (@F_Bank_ID,'BSD'), (@F_Bank_ID,'BTC'), (@F_Bank_ID,'BTN'), (@F_Bank_ID,'BUK'), (@F_Bank_ID,'BWP'), (@F_Bank_ID,'BYR'), (@F_Bank_ID,'BZD'), (@F_Bank_ID,'CAD'), (@F_Bank_ID,'CDF'), (@F_Bank_ID,'CDZ'), (@F_Bank_ID,'CHE'), (@F_Bank_ID,'CHF'), (@F_Bank_ID,'CHW'), (@F_Bank_ID,'CLF'), (@F_Bank_ID,'CLP'), (@F_Bank_ID,'CNY'), (@F_Bank_ID,'COP'), (@F_Bank_ID,'COU'), (@F_Bank_ID,'CRC'), (@F_Bank_ID,'CUP'), (@F_Bank_ID,'CVE'), (@F_Bank_ID,'CZK'), (@F_Bank_ID,'DJF'), (@F_Bank_ID,'DKK'), (@F_Bank_ID,'DOP'), (@F_Bank_ID,'DZD'), (@F_Bank_ID,'EEK'), (@F_Bank_ID,'EGP'), (@F_Bank_ID,'ERN'), (@F_Bank_ID,'ETB'), (@F_Bank_ID,'ETH'), (@F_Bank_ID,'EUR'), (@F_Bank_ID,'FJD'), (@F_Bank_ID,'FKP'), (@F_Bank_ID,'GBP'), (@F_Bank_ID,'GEL'), (@F_Bank_ID,'GHS'), (@F_Bank_ID,'GIP'), (@F_Bank_ID,'GMD'), (@F_Bank_ID,'GNF'), (@F_Bank_ID,'GNS'), (@F_Bank_ID,'GTQ'), (@F_Bank_ID,'GYD'), (@F_Bank_ID,'HKD'), (@F_Bank_ID,'HNL'), (@F_Bank_ID,'HRK'), (@F_Bank_ID,'HTG'), (@F_Bank_ID,'HUF'), (@F_Bank_ID,'IDR'), (@F_Bank_ID,'ILS'), (@F_Bank_ID,'INR'), (@F_Bank_ID,'IQD'), (@F_Bank_ID,'IRR'), (@F_Bank_ID,'ISK'), (@F_Bank_ID,'JMD'), (@F_Bank_ID,'JOD'), (@F_Bank_ID,'JPY'), (@F_Bank_ID,'KES'), (@F_Bank_ID,'KGS'), (@F_Bank_ID,'KHR'), (@F_Bank_ID,'KMF'), (@F_Bank_ID,'KPW'), (@F_Bank_ID,'KRW'), (@F_Bank_ID,'KWD'), (@F_Bank_ID,'KYD'), (@F_Bank_ID,'KZT'), (@F_Bank_ID,'LAK'), (@F_Bank_ID,'LBP'), (@F_Bank_ID,'LKR'), (@F_Bank_ID,'LRD'), (@F_Bank_ID,'LSL'), (@F_Bank_ID,'LSM'), (@F_Bank_ID,'LTC'), (@F_Bank_ID,'LTL'), (@F_Bank_ID,'LVL'), (@F_Bank_ID,'LYD'), (@F_Bank_ID,'MAD'), (@F_Bank_ID,'MDL'), (@F_Bank_ID,'MGA'), (@F_Bank_ID,'MKD'), (@F_Bank_ID,'MMK'), (@F_Bank_ID,'MNT'), (@F_Bank_ID,'MOP'), (@F_Bank_ID,'MRO'), (@F_Bank_ID,'MTP'), (@F_Bank_ID,'MUR'), (@F_Bank_ID,'MVR'), (@F_Bank_ID,'MWK'), (@F_Bank_ID,'MXN'), (@F_Bank_ID,'MYR'), (@F_Bank_ID,'MZN'), (@F_Bank_ID,'NAD'), (@F_Bank_ID,'NGN'), (@F_Bank_ID,'NIO'), (@F_Bank_ID,'NOK'), (@F_Bank_ID,'NPR'), (@F_Bank_ID,'NZD'), (@F_Bank_ID,'OMR'), (@F_Bank_ID,'OVC'), (@F_Bank_ID,'PAB'), (@F_Bank_ID,'PEN'), (@F_Bank_ID,'PES'), (@F_Bank_ID,'PGK'), (@F_Bank_ID,'PHP'), (@F_Bank_ID,'PKR'), (@F_Bank_ID,'PLN'), (@F_Bank_ID,'PYG'), (@F_Bank_ID,'QAR'), (@F_Bank_ID,'RON'), (@F_Bank_ID,'RSD'), (@F_Bank_ID,'RUB'), (@F_Bank_ID,'RWF'), (@F_Bank_ID,'SAR'), (@F_Bank_ID,'SBD'), (@F_Bank_ID,'SCR'), (@F_Bank_ID,'SDG'), (@F_Bank_ID,'SEK'), (@F_Bank_ID,'SGD'), (@F_Bank_ID,'SHP'), (@F_Bank_ID,'SLL'), (@F_Bank_ID,'SOS'), (@F_Bank_ID,'SRD'), (@F_Bank_ID,'SSP'), (@F_Bank_ID,'STD'), (@F_Bank_ID,'SYP'), (@F_Bank_ID,'SZL'), (@F_Bank_ID,'THB'), (@F_Bank_ID,'TJS'), (@F_Bank_ID,'TMT'), (@F_Bank_ID,'TND'), (@F_Bank_ID,'TOP'), (@F_Bank_ID,'TPE'), (@F_Bank_ID,'TRY'), (@F_Bank_ID,'TTD'), (@F_Bank_ID,'TWD'), (@F_Bank_ID,'TZS'), (@F_Bank_ID,'UAH'), (@F_Bank_ID,'UGX'), (@F_Bank_ID,'UKP'), (@F_Bank_ID,'USD'), (@F_Bank_ID,'USDT'), (@F_Bank_ID,'USN'), (@F_Bank_ID,'USS'), (@F_Bank_ID,'UYP'), (@F_Bank_ID,'UYU'), (@F_Bank_ID,'UZS'), (@F_Bank_ID,'VEF'), (@F_Bank_ID,'VND'), (@F_Bank_ID,'VUV'), (@F_Bank_ID,'WST'), (@F_Bank_ID,'XAF'), (@F_Bank_ID,'XAG'), (@F_Bank_ID,'XAU'), (@F_Bank_ID,'XBA'), (@F_Bank_ID,'XBB'), (@F_Bank_ID,'XBC'), (@F_Bank_ID,'XBD'), (@F_Bank_ID,'XCD'), (@F_Bank_ID,'XDG'), (@F_Bank_ID,'XDR'), (@F_Bank_ID,'XFU'), (@F_Bank_ID,'XLM'), (@F_Bank_ID,'XLN'), (@F_Bank_ID,'XOF'), (@F_Bank_ID,'XPD'), (@F_Bank_ID,'XPF'), (@F_Bank_ID,'XPT'), (@F_Bank_ID,'XRP'), (@F_Bank_ID,'XTS'), (@F_Bank_ID,'YER'), (@F_Bank_ID,'ZAR'), (@F_Bank_ID,'ZMK'), (@F_Bank_ID,'ZMW');

					delete from  FAF.FA_MROS_INT_LAND where userbk_nr=@F_BANK_ID;
					insert into FAF.FA_MROS_INT_LAND (userbk_nr,iso_land_cd) values (@F_Bank_ID,'AD'), (@F_Bank_ID,'AE'), (@F_Bank_ID,'AF'), (@F_Bank_ID,'AG'), (@F_Bank_ID,'AI'), (@F_Bank_ID,'AL'), (@F_Bank_ID,'AM'), (@F_Bank_ID,'AN'), (@F_Bank_ID,'AO'), (@F_Bank_ID,'AQ'), (@F_Bank_ID,'AR'), (@F_Bank_ID,'AS'), (@F_Bank_ID,'AT'), (@F_Bank_ID,'AU'), (@F_Bank_ID,'AW'), (@F_Bank_ID,'AX'), (@F_Bank_ID,'AZ'), (@F_Bank_ID,'BA'), (@F_Bank_ID,'BB'), (@F_Bank_ID,'BD'), (@F_Bank_ID,'BE'), (@F_Bank_ID,'BF'), (@F_Bank_ID,'BG'), (@F_Bank_ID,'BH'), (@F_Bank_ID,'BI'), (@F_Bank_ID,'BJ'), (@F_Bank_ID,'BL'), (@F_Bank_ID,'BM'), (@F_Bank_ID,'BN'), (@F_Bank_ID,'BO'), (@F_Bank_ID,'BQ'), (@F_Bank_ID,'BR'), (@F_Bank_ID,'BS'), (@F_Bank_ID,'BT'), (@F_Bank_ID,'BV'), (@F_Bank_ID,'BW'), (@F_Bank_ID,'BY'), (@F_Bank_ID,'BZ'), (@F_Bank_ID,'CA'), (@F_Bank_ID,'CC'), (@F_Bank_ID,'CD'), (@F_Bank_ID,'CF'), (@F_Bank_ID,'CG'), (@F_Bank_ID,'CH'), (@F_Bank_ID,'CI'), (@F_Bank_ID,'CK'), (@F_Bank_ID,'CL'), (@F_Bank_ID,'CM'), (@F_Bank_ID,'CN'), (@F_Bank_ID,'CO'), (@F_Bank_ID,'CR'), (@F_Bank_ID,'CU'), (@F_Bank_ID,'CV'), (@F_Bank_ID,'CW'), (@F_Bank_ID,'CX'), (@F_Bank_ID,'CY'), (@F_Bank_ID,'CZ'), (@F_Bank_ID,'DE'), (@F_Bank_ID,'DJ'), (@F_Bank_ID,'DK'), (@F_Bank_ID,'DM'), (@F_Bank_ID,'DO'), (@F_Bank_ID,'DZ'), (@F_Bank_ID,'EC'), (@F_Bank_ID,'EE'), (@F_Bank_ID,'EG'), (@F_Bank_ID,'EH'), (@F_Bank_ID,'ER'), (@F_Bank_ID,'ES'), (@F_Bank_ID,'ET'), (@F_Bank_ID,'FI'), (@F_Bank_ID,'FJ'), (@F_Bank_ID,'FK'), (@F_Bank_ID,'FM'), (@F_Bank_ID,'FO'), (@F_Bank_ID,'FR'), (@F_Bank_ID,'GA'), (@F_Bank_ID,'GB'), (@F_Bank_ID,'GD'), (@F_Bank_ID,'GE'), (@F_Bank_ID,'GF'), (@F_Bank_ID,'GG'), (@F_Bank_ID,'GH'), (@F_Bank_ID,'GI'), (@F_Bank_ID,'GL'), (@F_Bank_ID,'GM'), (@F_Bank_ID,'GN'), (@F_Bank_ID,'GP'), (@F_Bank_ID,'GQ'), (@F_Bank_ID,'GR'), (@F_Bank_ID,'GS'), (@F_Bank_ID,'GT'), (@F_Bank_ID,'GU'), (@F_Bank_ID,'GW'), (@F_Bank_ID,'GY'), (@F_Bank_ID,'HK'), (@F_Bank_ID,'HM'), (@F_Bank_ID,'HN'), (@F_Bank_ID,'HR'), (@F_Bank_ID,'HT'), (@F_Bank_ID,'HU'), (@F_Bank_ID,'ID'), (@F_Bank_ID,'IE'), (@F_Bank_ID,'IL'), (@F_Bank_ID,'IM'), (@F_Bank_ID,'IN'), (@F_Bank_ID,'IO'), (@F_Bank_ID,'IQ'), (@F_Bank_ID,'IR'), (@F_Bank_ID,'IS'), (@F_Bank_ID,'IT'), (@F_Bank_ID,'JE'), (@F_Bank_ID,'JM'), (@F_Bank_ID,'JO'), (@F_Bank_ID,'JP'), (@F_Bank_ID,'KE'), (@F_Bank_ID,'KG'), (@F_Bank_ID,'KH'), (@F_Bank_ID,'KI'), (@F_Bank_ID,'KM'), (@F_Bank_ID,'KN'), (@F_Bank_ID,'KP'), (@F_Bank_ID,'KR'), (@F_Bank_ID,'KS'), (@F_Bank_ID,'KW'), (@F_Bank_ID,'KY'), (@F_Bank_ID,'KZ'), (@F_Bank_ID,'LA'), (@F_Bank_ID,'LB'), (@F_Bank_ID,'LC'), (@F_Bank_ID,'LI'), (@F_Bank_ID,'LK'), (@F_Bank_ID,'LR'), (@F_Bank_ID,'LS'), (@F_Bank_ID,'LT'), (@F_Bank_ID,'LU'), (@F_Bank_ID,'LV'), (@F_Bank_ID,'LY'), (@F_Bank_ID,'MA'), (@F_Bank_ID,'MC'), (@F_Bank_ID,'MD'), (@F_Bank_ID,'ME'), (@F_Bank_ID,'MF'), (@F_Bank_ID,'MG'), (@F_Bank_ID,'MH'), (@F_Bank_ID,'MK'), (@F_Bank_ID,'ML'), (@F_Bank_ID,'MM'), (@F_Bank_ID,'MN'), (@F_Bank_ID,'MO'), (@F_Bank_ID,'MP'), (@F_Bank_ID,'MQ'), (@F_Bank_ID,'MR'), (@F_Bank_ID,'MS'), (@F_Bank_ID,'MT'), (@F_Bank_ID,'MU'), (@F_Bank_ID,'MV'), (@F_Bank_ID,'MW'), (@F_Bank_ID,'MX'), (@F_Bank_ID,'MY'), (@F_Bank_ID,'MZ'), (@F_Bank_ID,'NA'), (@F_Bank_ID,'NC'), (@F_Bank_ID,'NE'), (@F_Bank_ID,'NF'), (@F_Bank_ID,'NG'), (@F_Bank_ID,'NI'), (@F_Bank_ID,'NL'), (@F_Bank_ID,'NO'), (@F_Bank_ID,'NP'), (@F_Bank_ID,'NR'), (@F_Bank_ID,'NU'), (@F_Bank_ID,'NZ'), (@F_Bank_ID,'OM'), (@F_Bank_ID,'PA'), (@F_Bank_ID,'PE'), (@F_Bank_ID,'PF'), (@F_Bank_ID,'PG'), (@F_Bank_ID,'PH'), (@F_Bank_ID,'PK'), (@F_Bank_ID,'PL'), (@F_Bank_ID,'PM'), (@F_Bank_ID,'PN'), (@F_Bank_ID,'PR'), (@F_Bank_ID,'PS'), (@F_Bank_ID,'PT'), (@F_Bank_ID,'PW'), (@F_Bank_ID,'PY'), (@F_Bank_ID,'QA'), (@F_Bank_ID,'RE'), (@F_Bank_ID,'RO'), (@F_Bank_ID,'RS'), (@F_Bank_ID,'RU'), (@F_Bank_ID,'RW'), (@F_Bank_ID,'SA'), (@F_Bank_ID,'SB'), (@F_Bank_ID,'SC'), (@F_Bank_ID,'SD'), (@F_Bank_ID,'SE'), (@F_Bank_ID,'SG'), (@F_Bank_ID,'SH'), (@F_Bank_ID,'SI'), (@F_Bank_ID,'SJ'), (@F_Bank_ID,'SK'), (@F_Bank_ID,'SL'), (@F_Bank_ID,'SM'), (@F_Bank_ID,'SN'), (@F_Bank_ID,'SO'), (@F_Bank_ID,'SR'), (@F_Bank_ID,'SS'), (@F_Bank_ID,'ST'), (@F_Bank_ID,'SV'), (@F_Bank_ID,'SX'), (@F_Bank_ID,'SY'), (@F_Bank_ID,'SZ'), (@F_Bank_ID,'TC'), (@F_Bank_ID,'TD'), (@F_Bank_ID,'TF'), (@F_Bank_ID,'TG'), (@F_Bank_ID,'TH'), (@F_Bank_ID,'TJ'), (@F_Bank_ID,'TK'), (@F_Bank_ID,'TL'), (@F_Bank_ID,'TM'), (@F_Bank_ID,'TN'), (@F_Bank_ID,'TO'), (@F_Bank_ID,'TR'), (@F_Bank_ID,'TT'), (@F_Bank_ID,'TV'), (@F_Bank_ID,'TW'), (@F_Bank_ID,'TZ'), (@F_Bank_ID,'UA'), (@F_Bank_ID,'UG'), (@F_Bank_ID,'UM'), (@F_Bank_ID,'UNK'), (@F_Bank_ID,'US'), (@F_Bank_ID,'UY'), (@F_Bank_ID,'UZ'), (@F_Bank_ID,'VA'), (@F_Bank_ID,'VC'), (@F_Bank_ID,'VE'), (@F_Bank_ID,'VG'), (@F_Bank_ID,'VI'), (@F_Bank_ID,'VN'), (@F_Bank_ID,'VU'), (@F_Bank_ID,'WF'), (@F_Bank_ID,'WS'), (@F_Bank_ID,'XK'), (@F_Bank_ID,'YE'), (@F_Bank_ID,'YT'), (@F_Bank_ID,'ZA'), (@F_Bank_ID,'ZM'), (@F_Bank_ID,'ZW');

					delete from FAF.FA_MROS_INT_INDIZ where userbk_nr=@F_BANK_ID;
					insert into FAF.FA_MROS_INT_INDIZ (userbk_nr,indicator) values (@F_Bank_ID,'0001M'), (@F_Bank_ID,'0002M'), (@F_Bank_ID,'0003M'), (@F_Bank_ID,'0004M'), (@F_Bank_ID,'0005M'), (@F_Bank_ID,'0006M'), (@F_Bank_ID,'0007M'), (@F_Bank_ID,'0008M'), (@F_Bank_ID,'0009M'), (@F_Bank_ID,'0010M'), (@F_Bank_ID,'0011M'), (@F_Bank_ID,'0012M'), (@F_Bank_ID,'0013M'), (@F_Bank_ID,'0014M'), (@F_Bank_ID,'0023M'), (@F_Bank_ID,'0024M'), (@F_Bank_ID,'1001V'), (@F_Bank_ID,'1002V'), (@F_Bank_ID,'1003V'), (@F_Bank_ID,'1004V'), (@F_Bank_ID,'1005V'), (@F_Bank_ID,'1006V'), (@F_Bank_ID,'1007V'), (@F_Bank_ID,'1008V'), (@F_Bank_ID,'1009V'), (@F_Bank_ID,'1010V'), (@F_Bank_ID,'1011V'), (@F_Bank_ID,'1013V'), (@F_Bank_ID,'1014V'), (@F_Bank_ID,'1015V'), (@F_Bank_ID,'1016V'), (@F_Bank_ID,'1022V'), (@F_Bank_ID,'1073V'), (@F_Bank_ID,'1090V'), (@F_Bank_ID,'1091V'), (@F_Bank_ID,'1099V'), (@F_Bank_ID,'1102V'), (@F_Bank_ID,'1103V'), (@F_Bank_ID,'1104V'), (@F_Bank_ID,'1105V'), (@F_Bank_ID,'1106V'), (@F_Bank_ID,'1107V'), (@F_Bank_ID,'1108V'), (@F_Bank_ID,'1109V'), (@F_Bank_ID,'1110V'), (@F_Bank_ID,'1116V'), (@F_Bank_ID,'1119V'), (@F_Bank_ID,'1120V'), (@F_Bank_ID,'1121V'), (@F_Bank_ID,'1124V'), (@F_Bank_ID,'1125V'), (@F_Bank_ID,'1126V'), (@F_Bank_ID,'1127V'), (@F_Bank_ID,'1128V'), (@F_Bank_ID,'1129V'), (@F_Bank_ID,'1130V'), (@F_Bank_ID,'1131V'), (@F_Bank_ID,'1132V'), (@F_Bank_ID,'1133V'), (@F_Bank_ID,'1134V'), (@F_Bank_ID,'1135V'), (@F_Bank_ID,'1136V'), (@F_Bank_ID,'1137V'), (@F_Bank_ID,'1138V'), (@F_Bank_ID,'1139V'), (@F_Bank_ID,'1140V'), (@F_Bank_ID,'1141V'), (@F_Bank_ID,'1142V'), (@F_Bank_ID,'1143V'), (@F_Bank_ID,'1144V'), (@F_Bank_ID,'1145V'), (@F_Bank_ID,'1146V'), (@F_Bank_ID,'1147V'), (@F_Bank_ID,'1148V'), (@F_Bank_ID,'1149V'), (@F_Bank_ID,'1150V'), (@F_Bank_ID,'1151V'), (@F_Bank_ID,'1152V'), (@F_Bank_ID,'1153V'), (@F_Bank_ID,'1154V'), (@F_Bank_ID,'1155V'), (@F_Bank_ID,'1156V'), (@F_Bank_ID,'1157V'), (@F_Bank_ID,'1158V'), (@F_Bank_ID,'1159V'), (@F_Bank_ID,'1160V'), (@F_Bank_ID,'1161V'), (@F_Bank_ID,'1162V'), (@F_Bank_ID,'1163V'), (@F_Bank_ID,'1164V'), (@F_Bank_ID,'1165V'), (@F_Bank_ID,'1166V'), (@F_Bank_ID,'1167V'), (@F_Bank_ID,'1206V'), (@F_Bank_ID,'1207V'), (@F_Bank_ID,'2001G'), (@F_Bank_ID,'2002G'), (@F_Bank_ID,'2003G'), (@F_Bank_ID,'2004G'), (@F_Bank_ID,'2005G'), (@F_Bank_ID,'2006G'), (@F_Bank_ID,'2007G'), (@F_Bank_ID,'2008G'), (@F_Bank_ID,'2009G'), (@F_Bank_ID,'2010G'), (@F_Bank_ID,'2011G'), (@F_Bank_ID,'2012G'), (@F_Bank_ID,'2013G'), (@F_Bank_ID,'2014G'), (@F_Bank_ID,'2015G'), (@F_Bank_ID,'2016G'), (@F_Bank_ID,'2017G'), (@F_Bank_ID,'2018G'), (@F_Bank_ID,'2019G'), (@F_Bank_ID,'2020G'), (@F_Bank_ID,'2021G'), (@F_Bank_ID,'2022G'), (@F_Bank_ID,'2023G'), (@F_Bank_ID,'2024G'), (@F_Bank_ID,'2025G'), (@F_Bank_ID,'2026G'), (@F_Bank_ID,'2027G'), (@F_Bank_ID,'2028G'), (@F_Bank_ID,'2029G'), (@F_Bank_ID,'2103G'), (@F_Bank_ID,'3001B'), (@F_Bank_ID,'3002B'), (@F_Bank_ID,'3003B'), (@F_Bank_ID,'3004B'), (@F_Bank_ID,'3005B'), (@F_Bank_ID,'3006B'), (@F_Bank_ID,'3007B'), (@F_Bank_ID,'3008B'), (@F_Bank_ID,'3009B'), (@F_Bank_ID,'3010B'), (@F_Bank_ID,'3011B'), (@F_Bank_ID,'3012B'), (@F_Bank_ID,'3013B'), (@F_Bank_ID,'3014B'), (@F_Bank_ID,'3015B'), (@F_Bank_ID,'3016B'), (@F_Bank_ID,'3017B'), (@F_Bank_ID,'3018B'), (@F_Bank_ID,'3019B'), (@F_Bank_ID,'3020B'), (@F_Bank_ID,'3021B'), (@F_Bank_ID,'3022B'), (@F_Bank_ID,'3023B'), (@F_Bank_ID,'9812S');
				end;

				if @version='LI'
				begin
					delete from FAF.FA_MROS_INT_WRG where userbk_nr=@F_BANK_ID;
					insert into FAF.FA_MROS_INT_WRG (userbk_nr,iso_wrg_cd) values (@F_BANK_ID,'-'),(@F_BANK_ID,'ADF'),(@F_BANK_ID,'ADP'),(@F_BANK_ID,'AED'),(@F_BANK_ID,'AFN'),(@F_BANK_ID,'ALL'),(@F_BANK_ID,'AMD'),(@F_BANK_ID,'ANG'),(@F_BANK_ID,'AOA'),(@F_BANK_ID,'AOK'),(@F_BANK_ID,'AON'),(@F_BANK_ID,'ARA'),(@F_BANK_ID,'ARS'),(@F_BANK_ID,'ATS'),(@F_BANK_ID,'AUD'),(@F_BANK_ID,'AWG'),(@F_BANK_ID,'AZN'),(@F_BANK_ID,'BAM'),(@F_BANK_ID,'BBD'),(@F_BANK_ID,'BDT'),(@F_BANK_ID,'BEC'),(@F_BANK_ID,'BEF'),(@F_BANK_ID,'BEL'),(@F_BANK_ID,'BGL'),(@F_BANK_ID,'BGN'),(@F_BANK_ID,'BHD'),(@F_BANK_ID,'BIF'),(@F_BANK_ID,'BMD'),(@F_BANK_ID,'BND'),(@F_BANK_ID,'BOB'),(@F_BANK_ID,'BRL'),(@F_BANK_ID,'BSD'),(@F_BANK_ID,'BTN'),(@F_BANK_ID,'BUK'),(@F_BANK_ID,'BWP'),(@F_BANK_ID,'BYN'),(@F_BANK_ID,'BYR'),(@F_BANK_ID,'BZD'),(@F_BANK_ID,'CAD'),(@F_BANK_ID,'CDF'),(@F_BANK_ID,'CDZ'),(@F_BANK_ID,'CHE'),(@F_BANK_ID,'CHF'),(@F_BANK_ID,'CHW'),(@F_BANK_ID,'CLF'),(@F_BANK_ID,'CLP'),(@F_BANK_ID,'CNY'),(@F_BANK_ID,'COP'),(@F_BANK_ID,'COU'),(@F_BANK_ID,'CRC'),(@F_BANK_ID,'CSK'),(@F_BANK_ID,'CUC'),(@F_BANK_ID,'CUP'),(@F_BANK_ID,'CVE'),(@F_BANK_ID,'CYP'),(@F_BANK_ID,'CZK'),(@F_BANK_ID,'DDM'),(@F_BANK_ID,'DEM'),(@F_BANK_ID,'DJF'),(@F_BANK_ID,'DKK'),(@F_BANK_ID,'DOP'),(@F_BANK_ID,'DZD'),(@F_BANK_ID,'ECS'),(@F_BANK_ID,'ECV'),(@F_BANK_ID,'EEK'),(@F_BANK_ID,'EGP'),(@F_BANK_ID,'ERN'),(@F_BANK_ID,'ESA'),(@F_BANK_ID,'ESB'),(@F_BANK_ID,'ESP'),(@F_BANK_ID,'ETB'),(@F_BANK_ID,'EUR'),(@F_BANK_ID,'FIM'),(@F_BANK_ID,'FJD'),(@F_BANK_ID,'FKP'),(@F_BANK_ID,'FRF'),(@F_BANK_ID,'GBP'),(@F_BANK_ID,'GEL'),(@F_BANK_ID,'GHC'),(@F_BANK_ID,'GHS'),(@F_BANK_ID,'GIP'),(@F_BANK_ID,'GMD'),(@F_BANK_ID,'GNF'),(@F_BANK_ID,'GNS'),(@F_BANK_ID,'GQE'),(@F_BANK_ID,'GRD'),(@F_BANK_ID,'GTQ'),(@F_BANK_ID,'GWP'),(@F_BANK_ID,'GYD'),(@F_BANK_ID,'HKD'),(@F_BANK_ID,'HNL'),(@F_BANK_ID,'HRK'),(@F_BANK_ID,'HTG'),(@F_BANK_ID,'HUF'),(@F_BANK_ID,'IDR'),(@F_BANK_ID,'IEP'),(@F_BANK_ID,'ILP'),(@F_BANK_ID,'ILR'),(@F_BANK_ID,'ILS'),(@F_BANK_ID,'INR'),(@F_BANK_ID,'IQD'),(@F_BANK_ID,'IRR'),(@F_BANK_ID,'ISJ'),(@F_BANK_ID,'ISK'),(@F_BANK_ID,'ITL'),(@F_BANK_ID,'JMD'),(@F_BANK_ID,'JOD'),(@F_BANK_ID,'JPY'),(@F_BANK_ID,'KES'),(@F_BANK_ID,'KGS'),(@F_BANK_ID,'KHR'),(@F_BANK_ID,'KMF'),(@F_BANK_ID,'KPW'),(@F_BANK_ID,'KRW'),(@F_BANK_ID,'KWD'),(@F_BANK_ID,'KYD'),(@F_BANK_ID,'KZT'),(@F_BANK_ID,'LAJ'),(@F_BANK_ID,'LAK'),(@F_BANK_ID,'LBP'),(@F_BANK_ID,'LKR'),(@F_BANK_ID,'LRD'),(@F_BANK_ID,'LSL'),(@F_BANK_ID,'LSM'),(@F_BANK_ID,'LTL'),(@F_BANK_ID,'LUF'),(@F_BANK_ID,'LVL'),(@F_BANK_ID,'LYD'),(@F_BANK_ID,'MAD'),(@F_BANK_ID,'MAF'),(@F_BANK_ID,'MCF'),(@F_BANK_ID,'MDL'),(@F_BANK_ID,'MGA'),(@F_BANK_ID,'MKD'),(@F_BANK_ID,'MKN'),(@F_BANK_ID,'MLF'),(@F_BANK_ID,'MMK'),(@F_BANK_ID,'MNT'),(@F_BANK_ID,'MOP'),(@F_BANK_ID,'MRO'),(@F_BANK_ID,'MTL'),(@F_BANK_ID,'MTP'),(@F_BANK_ID,'MUR'),(@F_BANK_ID,'MVQ'),(@F_BANK_ID,'MVR'),(@F_BANK_ID,'MWK'),(@F_BANK_ID,'MXN'),(@F_BANK_ID,'MYR'),(@F_BANK_ID,'MZM'),(@F_BANK_ID,'MZN'),(@F_BANK_ID,'NAD'),(@F_BANK_ID,'NFD'),(@F_BANK_ID,'NGN'),(@F_BANK_ID,'NIO'),(@F_BANK_ID,'NLG'),(@F_BANK_ID,'NOK'),(@F_BANK_ID,'NPR'),(@F_BANK_ID,'NZD'),(@F_BANK_ID,'OMR'),(@F_BANK_ID,'PAB'),(@F_BANK_ID,'PEH'),(@F_BANK_ID,'PEI'),(@F_BANK_ID,'PEN'),(@F_BANK_ID,'PES'),(@F_BANK_ID,'PGK'),(@F_BANK_ID,'PHP'),(@F_BANK_ID,'PKR'),(@F_BANK_ID,'PLN'),(@F_BANK_ID,'PLZ'),(@F_BANK_ID,'PTE'),(@F_BANK_ID,'PYG'),(@F_BANK_ID,'QAR'),(@F_BANK_ID,'ROL'),(@F_BANK_ID,'RON'),(@F_BANK_ID,'RSD'),(@F_BANK_ID,'RUB'),(@F_BANK_ID,'RUR'),(@F_BANK_ID,'RWF'),(@F_BANK_ID,'SAR'),(@F_BANK_ID,'SBD'),(@F_BANK_ID,'SCR'),(@F_BANK_ID,'SDD'),(@F_BANK_ID,'SDG'),(@F_BANK_ID,'SEK'),(@F_BANK_ID,'SGD'),(@F_BANK_ID,'SHP'),(@F_BANK_ID,'SIT'),(@F_BANK_ID,'SKK'),(@F_BANK_ID,'SLL'),(@F_BANK_ID,'SML'),(@F_BANK_ID,'SOS'),(@F_BANK_ID,'SRD'),(@F_BANK_ID,'SSP'),(@F_BANK_ID,'SUR'),(@F_BANK_ID,'SVC'),(@F_BANK_ID,'SYP'),(@F_BANK_ID,'SZL'),(@F_BANK_ID,'THB'),(@F_BANK_ID,'TJR'),(@F_BANK_ID,'TJS'),(@F_BANK_ID,'TMM'),(@F_BANK_ID,'TMT'),(@F_BANK_ID,'TND'),(@F_BANK_ID,'TOP'),(@F_BANK_ID,'TPE'),(@F_BANK_ID,'TRY'),(@F_BANK_ID,'TTD'),(@F_BANK_ID,'TWD'),(@F_BANK_ID,'TZS'),(@F_BANK_ID,'UAH'),(@F_BANK_ID,'UGS'),(@F_BANK_ID,'UGX'),(@F_BANK_ID,'UKP'),(@F_BANK_ID,'USD'),(@F_BANK_ID,'USN'),(@F_BANK_ID,'USS'),(@F_BANK_ID,'UYN'),(@F_BANK_ID,'UYP'),(@F_BANK_ID,'UYU'),(@F_BANK_ID,'UZS'),(@F_BANK_ID,'VAL'),(@F_BANK_ID,'VEB'),(@F_BANK_ID,'VEF'),(@F_BANK_ID,'VND'),(@F_BANK_ID,'VUV'),(@F_BANK_ID,'WST'),(@F_BANK_ID,'XAF'),(@F_BANK_ID,'XAG'),(@F_BANK_ID,'XAU'),(@F_BANK_ID,'XBA'),(@F_BANK_ID,'XBB'),(@F_BANK_ID,'XBC'),(@F_BANK_ID,'XBD'),(@F_BANK_ID,'XBT'),(@F_BANK_ID,'XBU'),(@F_BANK_ID,'XCC'),(@F_BANK_ID,'XCD'),(@F_BANK_ID,'XDR'),(@F_BANK_ID,'XEU'),(@F_BANK_ID,'XFO'),(@F_BANK_ID,'XFU'),(@F_BANK_ID,'XOF'),(@F_BANK_ID,'XPD'),(@F_BANK_ID,'XPF'),(@F_BANK_ID,'XPT'),(@F_BANK_ID,'XTS'),(@F_BANK_ID,'XXX'),(@F_BANK_ID,'YDD'),(@F_BANK_ID,'YER'),(@F_BANK_ID,'YUD'),(@F_BANK_ID,'YUG'),(@F_BANK_ID,'YUM'),(@F_BANK_ID,'YUN'),(@F_BANK_ID,'YUO'),(@F_BANK_ID,'YUR'),(@F_BANK_ID,'ZAL'),(@F_BANK_ID,'ZAR'),(@F_BANK_ID,'ZMK'),(@F_BANK_ID,'ZMW'),(@F_BANK_ID,'ZRN'),(@F_BANK_ID,'ZRZ'),(@F_BANK_ID,'ZWC'),(@F_BANK_ID,'ZWD'),(@F_BANK_ID,'ZWL'),(@F_BANK_ID,'ZWN');

					delete from  FAF.FA_MROS_INT_LAND where userbk_nr=@F_BANK_ID;
					insert into FAF.FA_MROS_INT_LAND (userbk_nr,iso_land_cd) values (@F_BANK_ID,'AF'),(@F_BANK_ID,'EG'),(@F_BANK_ID,'AX'),(@F_BANK_ID,'AL'),(@F_BANK_ID,'DZ'),(@F_BANK_ID,'VI'),(@F_BANK_ID,'AS'),(@F_BANK_ID,'AD'),(@F_BANK_ID,'AO'),(@F_BANK_ID,'AI'),(@F_BANK_ID,'AG'),(@F_BANK_ID,'GQ'),(@F_BANK_ID,'SY'),(@F_BANK_ID,'AR'),(@F_BANK_ID,'AQ'),(@F_BANK_ID,'AM'),(@F_BANK_ID,'AW'),(@F_BANK_ID,'AZ'),(@F_BANK_ID,'ET'),(@F_BANK_ID,'AU'),(@F_BANK_ID,'BS'),(@F_BANK_ID,'BH'),(@F_BANK_ID,'BD'),(@F_BANK_ID,'BB'),(@F_BANK_ID,'BE'),(@F_BANK_ID,'BZ'),(@F_BANK_ID,'BJ'),(@F_BANK_ID,'BM'),(@F_BANK_ID,'BT'),(@F_BANK_ID,'BO'),(@F_BANK_ID,'BQ'),(@F_BANK_ID,'BA'),(@F_BANK_ID,'BW'),(@F_BANK_ID,'BV'),(@F_BANK_ID,'BR'),(@F_BANK_ID,'VG'),(@F_BANK_ID,'IO'),(@F_BANK_ID,'BN'),(@F_BANK_ID,'BG'),(@F_BANK_ID,'BF'),(@F_BANK_ID,'BI'),(@F_BANK_ID,'CV'),(@F_BANK_ID,'CL'),(@F_BANK_ID,'CN'),(@F_BANK_ID,'CK'),(@F_BANK_ID,'CR'),(@F_BANK_ID,'CI'),(@F_BANK_ID,'CW'),(@F_BANK_ID,'DK'),(@F_BANK_ID,'CD'),(@F_BANK_ID,'KP'),(@F_BANK_ID,'LA'),(@F_BANK_ID,'DE'),(@F_BANK_ID,'DM'),(@F_BANK_ID,'DO'),(@F_BANK_ID,'DJ'),(@F_BANK_ID,'EC'),(@F_BANK_ID,'MK'),(@F_BANK_ID,'SV'),(@F_BANK_ID,'ER'),(@F_BANK_ID,'EE'),(@F_BANK_ID,'FK'),(@F_BANK_ID,'FO'),(@F_BANK_ID,'FJ'),(@F_BANK_ID,'FI'),(@F_BANK_ID,'FM'),(@F_BANK_ID,'FR'),(@F_BANK_ID,'TF'),(@F_BANK_ID,'GF'),(@F_BANK_ID,'PF'),(@F_BANK_ID,'GA'),(@F_BANK_ID,'GM'),(@F_BANK_ID,'GE'),(@F_BANK_ID,'GH'),(@F_BANK_ID,'GI'),(@F_BANK_ID,'GD'),(@F_BANK_ID,'GR'),(@F_BANK_ID,'GL'),(@F_BANK_ID,'GP'),(@F_BANK_ID,'GU'),(@F_BANK_ID,'GT'),(@F_BANK_ID,'GG'),(@F_BANK_ID,'GN'),(@F_BANK_ID,'GW'),(@F_BANK_ID,'GY'),(@F_BANK_ID,'HT'),(@F_BANK_ID,'HM'),(@F_BANK_ID,'HN'),(@F_BANK_ID,'HK'),(@F_BANK_ID,'IN'),(@F_BANK_ID,'ID'),(@F_BANK_ID,'IM'),(@F_BANK_ID,'IQ'),(@F_BANK_ID,'IE'),(@F_BANK_ID,'IR'),(@F_BANK_ID,'IS'),(@F_BANK_ID,'IL'),(@F_BANK_ID,'IT'),(@F_BANK_ID,'JM'),(@F_BANK_ID,'JP'),(@F_BANK_ID,'YE'),(@F_BANK_ID,'JE'),(@F_BANK_ID,'JO'),(@F_BANK_ID,'KY'),(@F_BANK_ID,'KH'),(@F_BANK_ID,'CM'),(@F_BANK_ID,'CA'),(@F_BANK_ID,'KZ'),(@F_BANK_ID,'QA'),(@F_BANK_ID,'KE'),(@F_BANK_ID,'KG'),(@F_BANK_ID,'KI'),(@F_BANK_ID,'UM'),(@F_BANK_ID,'CC'),(@F_BANK_ID,'CO'),(@F_BANK_ID,'KM'),(@F_BANK_ID,'CG'),(@F_BANK_ID,'XK'),(@F_BANK_ID,'KS'),(@F_BANK_ID,'HR'),(@F_BANK_ID,'CU'),(@F_BANK_ID,'KW'),(@F_BANK_ID,'LS'),(@F_BANK_ID,'LV'),(@F_BANK_ID,'LB'),(@F_BANK_ID,'LR'),(@F_BANK_ID,'LY'),(@F_BANK_ID,'LI'),(@F_BANK_ID,'LT'),(@F_BANK_ID,'LU'),(@F_BANK_ID,'MO'),(@F_BANK_ID,'MG'),(@F_BANK_ID,'MW'),(@F_BANK_ID,'MY'),(@F_BANK_ID,'MV'),(@F_BANK_ID,'ML'),(@F_BANK_ID,'MT'),(@F_BANK_ID,'MA'),(@F_BANK_ID,'MH'),(@F_BANK_ID,'MQ'),(@F_BANK_ID,'MR'),(@F_BANK_ID,'MU'),(@F_BANK_ID,'YT'),(@F_BANK_ID,'MX'),(@F_BANK_ID,'MC'),(@F_BANK_ID,'MN'),(@F_BANK_ID,'ME'),(@F_BANK_ID,'MS'),(@F_BANK_ID,'MZ'),(@F_BANK_ID,'MM'),(@F_BANK_ID,'NA'),(@F_BANK_ID,'NR'),(@F_BANK_ID,'NP'),(@F_BANK_ID,'NC'),(@F_BANK_ID,'NZ'),(@F_BANK_ID,'NI'),(@F_BANK_ID,'NL'),(@F_BANK_ID,'AN'),(@F_BANK_ID,'NE'),(@F_BANK_ID,'NG'),(@F_BANK_ID,'NU'),(@F_BANK_ID,'MP'),(@F_BANK_ID,'NF'),(@F_BANK_ID,'NO'),(@F_BANK_ID,'OM'),(@F_BANK_ID,'AT'),(@F_BANK_ID,'PK'),(@F_BANK_ID,'PW'),(@F_BANK_ID,'PA'),(@F_BANK_ID,'PG'),(@F_BANK_ID,'PY'),(@F_BANK_ID,'PE'),(@F_BANK_ID,'PH'),(@F_BANK_ID,'PN'),(@F_BANK_ID,'PL'),(@F_BANK_ID,'PT'),(@F_BANK_ID,'PR'),(@F_BANK_ID,'KR'),(@F_BANK_ID,'MD'),(@F_BANK_ID,'RE'),(@F_BANK_ID,'RW'),(@F_BANK_ID,'RO'),(@F_BANK_ID,'RU'),(@F_BANK_ID,'SB'),(@F_BANK_ID,'ZM'),(@F_BANK_ID,'WS'),(@F_BANK_ID,'SM'),(@F_BANK_ID,'ST'),(@F_BANK_ID,'SA'),(@F_BANK_ID,'SE'),(@F_BANK_ID,'CH'),(@F_BANK_ID,'SN'),(@F_BANK_ID,'RS'),(@F_BANK_ID,'SC'),(@F_BANK_ID,'SL'),(@F_BANK_ID,'ZW'),(@F_BANK_ID,'SG'),(@F_BANK_ID,'SK'),(@F_BANK_ID,'SI'),(@F_BANK_ID,'SO'),(@F_BANK_ID,'ES'),(@F_BANK_ID,'LK'),(@F_BANK_ID,'BL'),(@F_BANK_ID,'SH'),(@F_BANK_ID,'KN'),(@F_BANK_ID,'LC'),(@F_BANK_ID,'MF'),(@F_BANK_ID,'SX'),(@F_BANK_ID,'PM'),(@F_BANK_ID,'VC'),(@F_BANK_ID,'PS'),(@F_BANK_ID,'ZA'),(@F_BANK_ID,'SD'),(@F_BANK_ID,'GS'),(@F_BANK_ID,'SS'),(@F_BANK_ID,'SR'),(@F_BANK_ID,'SJ'),(@F_BANK_ID,'SZ'),(@F_BANK_ID,'TJ'),(@F_BANK_ID,'TW'),(@F_BANK_ID,'TH'),(@F_BANK_ID,'TL'),(@F_BANK_ID,'TG'),(@F_BANK_ID,'TK'),(@F_BANK_ID,'TO'),(@F_BANK_ID,'TT'),(@F_BANK_ID,'TD'),(@F_BANK_ID,'CZ'),(@F_BANK_ID,'TN'),(@F_BANK_ID,'TR'),(@F_BANK_ID,'TM'),(@F_BANK_ID,'TC'),(@F_BANK_ID,'TV'),(@F_BANK_ID,'UG'),(@F_BANK_ID,'UA'),(@F_BANK_ID,'-'),(@F_BANK_ID,'HU'),(@F_BANK_ID,'UY'),(@F_BANK_ID,'UZ'),(@F_BANK_ID,'VU'),(@F_BANK_ID,'VA'),(@F_BANK_ID,'VE'),(@F_BANK_ID,'AE'),(@F_BANK_ID,'TZ'),(@F_BANK_ID,'US'),(@F_BANK_ID,'GB'),(@F_BANK_ID,'VN'),(@F_BANK_ID,'WF'),(@F_BANK_ID,'CX'),(@F_BANK_ID,'BY'),(@F_BANK_ID,'EH'),(@F_BANK_ID,'CF'),(@F_BANK_ID,'CY');

					delete from FAF.FA_MROS_INT_INDIZ where userbk_nr=@F_BANK_ID;
					insert into FAF.FA_MROS_INT_INDIZ (userbk_nr,indicator) values (@F_BANK_ID,'G01'),(@F_BANK_ID,'G02'),(@F_BANK_ID,'G03'),(@F_BANK_ID,'G04'),(@F_BANK_ID,'G05'),(@F_BANK_ID,'G06'),(@F_BANK_ID,'G07'),(@F_BANK_ID,'G08'),(@F_BANK_ID,'G09'),(@F_BANK_ID,'K01'),(@F_BANK_ID,'K02'),(@F_BANK_ID,'K03'),(@F_BANK_ID,'K04'),(@F_BANK_ID,'K05'),(@F_BANK_ID,'K06'),(@F_BANK_ID,'K07'),(@F_BANK_ID,'K08'),(@F_BANK_ID,'K09'),(@F_BANK_ID,'K10'),(@F_BANK_ID,'K11'),(@F_BANK_ID,'K12'),(@F_BANK_ID,'K13'),(@F_BANK_ID,'K14'),(@F_BANK_ID,'K15'),(@F_BANK_ID,'K16'),(@F_BANK_ID,'KD0201'),(@F_BANK_ID,'KD0202'),(@F_BANK_ID,'KD0203'),(@F_BANK_ID,'KD0204'),(@F_BANK_ID,'KD0205'),(@F_BANK_ID,'KD0301'),(@F_BANK_ID,'KD0401'),(@F_BANK_ID,'KD0501'),(@F_BANK_ID,'KD0502'),(@F_BANK_ID,'KD0601'),(@F_BANK_ID,'KD0602'),(@F_BANK_ID,'KD0603'),(@F_BANK_ID,'KD0604'),(@F_BANK_ID,'KD0701'),(@F_BANK_ID,'KD0702'),(@F_BANK_ID,'KD0801'),(@F_BANK_ID,'KD0901'),(@F_BANK_ID,'KD0902'),(@F_BANK_ID,'KD0903'),(@F_BANK_ID,'KD1001'),(@F_BANK_ID,'KD1101'),(@F_BANK_ID,'KD1501'),(@F_BANK_ID,'KD1502'),(@F_BANK_ID,'VISG01'),(@F_BANK_ID,'VISG02'),(@F_BANK_ID,'VISG03'),(@F_BANK_ID,'VISG04'),(@F_BANK_ID,'VISG05'),(@F_BANK_ID,'VISG06'),(@F_BANK_ID,'VISG07'),(@F_BANK_ID,'VISG08'),(@F_BANK_ID,'VISG09'),(@F_BANK_ID,'VISG10'),(@F_BANK_ID,'VISG11'),(@F_BANK_ID,'VISG12'),(@F_BANK_ID,'VISG13'),(@F_BANK_ID,'VISG14'),(@F_BANK_ID,'VISG145'),(@F_BANK_ID,'VISG15'),(@F_BANK_ID,'VISG16'),(@F_BANK_ID,'VISG165'),(@F_BANK_ID,'VISG17'),(@F_BANK_ID,'VISG18'),(@F_BANK_ID,'VISG19'),(@F_BANK_ID,'VISG20'),(@F_BANK_ID,'VISG21'),(@F_BANK_ID,'VISG22'),(@F_BANK_ID,'VISG23'),(@F_BANK_ID,'VISG24'),(@F_BANK_ID,'VISG241'),(@F_BANK_ID,'VISG25'),(@F_BANK_ID,'VISG26'),(@F_BANK_ID,'VISG27');
				end;

				--support tables
				if @Version in ('LI','CH')
				begin
					delete from FAF.FA_MROS_VERSION_SUPPORT_DEFAULT where userbk_nr=@F_BANK_ID;
					delete from FAF.FA_MROS_VERSION_SUPPORT_SPECIAL where userbk_nr=@F_BANK_ID;
				end;

				if @Version = 'CH'
					begin
						INSERT INTO [FAF].[FA_MROS_VERSION_SUPPORT_DEFAULT]
							([userbk_nr],
							[name],
							[value],
							[length])
						VALUES
							(@F_BANK_ID,'rp__rentity_id',NULL,NULL),
							(@F_BANK_ID,'rp__rentity_branch',NULL,255),
							(@F_BANK_ID,'rp__submission_code','E',NULL),
							(@F_BANK_ID,'rp__report_code',NULL,NULL),
							(@F_BANK_ID,'rp__entity_reference','n/a',255),
							(@F_BANK_ID,'rp__fiu_ref_number',NULL,255),
							(@F_BANK_ID,'rp__submission_date',NULL,19),
							(@F_BANK_ID,'rp__currency_code_local','CHF',NULL),
							(@F_BANK_ID,'rp__reason','n/a',8000),
							(@F_BANK_ID,'rp__action','n/a',8000),
							(@F_BANK_ID,'tr__transactionnumber','n/a',100),
							(@F_BANK_ID,'tr__internal_ref_number',NULL,100),
							(@F_BANK_ID,'tr__transaction_location',NULL,255),
							(@F_BANK_ID,'tr__transaction_description','n/a',8000),
							(@F_BANK_ID,'tr__date_transaction','1753-01-01T00:00:00',19),
							(@F_BANK_ID,'tr__teller',NULL,20),
							(@F_BANK_ID,'tr__authorized',NULL,20),
							(@F_BANK_ID,'tr__late_deposit',NULL,NULL),
							(@F_BANK_ID,'tr__date_posting',NULL,19),
							(@F_BANK_ID,'tr__value_date',NULL,19),
							(@F_BANK_ID,'tr__transmode_code','15',NULL),
							(@F_BANK_ID,'tr__transmode_comment',NULL,50),
							(@F_BANK_ID,'tr__amount_local','0.01',NULL),
							(@F_BANK_ID,'tfmc__from_funds_code','27',NULL),
							(@F_BANK_ID,'tfmc__from_funds_comment',NULL,255),
							(@F_BANK_ID,'tfmc__from_country',NULL,NULL),
							(@F_BANK_ID,'tf__from_funds_code','27',NULL),
							(@F_BANK_ID,'tf__from_funds_comment',NULL,255),
							(@F_BANK_ID,'tf__from_country',NULL,NULL),
							(@F_BANK_ID,'ttmc__to_funds_code','27',NULL),
							(@F_BANK_ID,'ttmc__to_funds_comment',NULL,255),
							(@F_BANK_ID,'ttmc__to_country',NULL,NULL),
							(@F_BANK_ID,'tt__to_funds_code','27',NULL),
							(@F_BANK_ID,'tt__to_funds_comment',NULL,255),
							(@F_BANK_ID,'tt__to_country',NULL,NULL),
							(@F_BANK_ID,'tr__comments',NULL,8000),
							(@F_BANK_ID,'tamc__institution_name','n/a',255),
							(@F_BANK_ID,'tamc__institution_code',NULL,50),
							(@F_BANK_ID,'tamc__swift','n/a',11),
							(@F_BANK_ID,'tamc__non_bank_institution',NULL,NULL),
							(@F_BANK_ID,'tamc__branch','ZH',2),
							(@F_BANK_ID,'tamc__account','n/a',255),
							(@F_BANK_ID,'tamc__currency_code','CHF',NULL),
							(@F_BANK_ID,'tamc__account_name',NULL,255),
							(@F_BANK_ID,'tamc__iban','n/a',34),
							(@F_BANK_ID,'tamc__client_number','n/a',30),
							(@F_BANK_ID,'tamc__personal_account_type','16',NULL),
							(@F_BANK_ID,'tamc__is_primary',NULL,NULL),
							(@F_BANK_ID,'tamc__role','6',NULL),
							(@F_BANK_ID,'tamc__opened','1753-01-01T00:00:00',19),
							(@F_BANK_ID,'tamc__closed',NULL,19),
							(@F_BANK_ID,'tamc__balance',NULL,NULL),
							(@F_BANK_ID,'tamc__date_balance',NULL,19),
							(@F_BANK_ID,'tamc__status_code','4',NULL),
							(@F_BANK_ID,'tamc__status_date',NULL,19),
							(@F_BANK_ID,'tamc__beneficiary',NULL,NULL),
							(@F_BANK_ID,'tamc__beneficiary_comment','n/a',255),
							(@F_BANK_ID,'tamc__comments',NULL,8000),
							(@F_BANK_ID,'ta__institution_name','n/a',255),
							(@F_BANK_ID,'ta__institution_code',NULL,50),
							(@F_BANK_ID,'ta__swift','n/a',11),
							(@F_BANK_ID,'ta__non_bank_institution',NULL,NULL),
							(@F_BANK_ID,'ta__branch','ZH',2),
							(@F_BANK_ID,'ta__account','n/a',255),
							(@F_BANK_ID,'ta__currency_code','CHF',NULL),
							(@F_BANK_ID,'ta__account_name',NULL,255),
							(@F_BANK_ID,'ta__iban',NULL,34),
							(@F_BANK_ID,'ta__client_number','n/a',30),
							(@F_BANK_ID,'ta__personal_account_type','16',NULL),
							(@F_BANK_ID,'ta__is_primary',NULL,NULL),
							(@F_BANK_ID,'ta__role','6',NULL),
							(@F_BANK_ID,'ta__opened','1753-01-01T00:00:00',19),
							(@F_BANK_ID,'ta__closed',NULL,19),
							(@F_BANK_ID,'ta__balance',NULL,NULL),
							(@F_BANK_ID,'ta__date_balance',NULL,19),
							(@F_BANK_ID,'ta__status_code','4',NULL),
							(@F_BANK_ID,'ta__beneficiary',NULL,NULL),
							(@F_BANK_ID,'ta__beneficiary_comment','n/a',255),
							(@F_BANK_ID,'ta__comments','n/a',8000),
							(@F_BANK_ID,'temc__name','n/a',255),
							(@F_BANK_ID,'temc__commercial_name',NULL,255),
							(@F_BANK_ID,'temc__incorporation_legal_form','1',NULL),
							(@F_BANK_ID,'temc__incorporation_number',NULL,50),
							(@F_BANK_ID,'temc__business',NULL,255),
							(@F_BANK_ID,'temc__email',NULL,255),
							(@F_BANK_ID,'temc__url',NULL,255),
							(@F_BANK_ID,'temc__incorporation_state',NULL,255),
							(@F_BANK_ID,'temc__incorporation_country_code','UNK',NULL),
							(@F_BANK_ID,'temc__incorporation_date',NULL,19),
							(@F_BANK_ID,'temc__business_closed',NULL,NULL),
							(@F_BANK_ID,'temc__date_business_closed',NULL,19),
							(@F_BANK_ID,'temc__tax_number',NULL,100),
							(@F_BANK_ID,'temc__tax_reg_number','yes',NULL),
							(@F_BANK_ID,'temc__comments',NULL,8000),
							(@F_BANK_ID,'te__name','n/a',255),
							(@F_BANK_ID,'te__commercial_name',NULL,255),
							(@F_BANK_ID,'te__incorporation_legal_form','1',NULL),
							(@F_BANK_ID,'te__incorporation_number',NULL,50),
							(@F_BANK_ID,'te__business',NULL,255),
							(@F_BANK_ID,'te__email',NULL,255),
							(@F_BANK_ID,'te__url',NULL,255),
							(@F_BANK_ID,'te__incorporation_state',NULL,255),
							(@F_BANK_ID,'te__incorporation_country_code','UNK',NULL),
							(@F_BANK_ID,'te__incorporation_date',NULL,19),
							(@F_BANK_ID,'te__business_closed',NULL,NULL),
							(@F_BANK_ID,'te__date_business_closed',NULL,19),
							(@F_BANK_ID,'te__tax_number',NULL,100),
							(@F_BANK_ID,'te__tax_reg_number','yes',NULL),
							(@F_BANK_ID,'te__comments',NULL,8000),
							(@F_BANK_ID,'tpmc__gender','U',NULL),
							(@F_BANK_ID,'tpmc__title',NULL,30),
							(@F_BANK_ID,'tpmc__first_name','n/a',100),
							(@F_BANK_ID,'tpmc__middle_name',NULL,100),
							(@F_BANK_ID,'tpmc__prefix',NULL,100),
							(@F_BANK_ID,'tpmc__last_name','n/a',100),
							(@F_BANK_ID,'tpmc__birthdate','1753-01-01T00:00:00',19),
							(@F_BANK_ID,'tpmc__birth_place',NULL,255),
							(@F_BANK_ID,'tpmc__mothers_name',NULL,100),
							(@F_BANK_ID,'tpmc__alias',NULL,100),
							(@F_BANK_ID,'tpmc__ssn',NULL,25),
							(@F_BANK_ID,'tpmc__passport_number',NULL,255),
							(@F_BANK_ID,'tpmc__passport_country',NULL,NULL),
							(@F_BANK_ID,'tpmc__id_number',NULL,25),
							(@F_BANK_ID,'tpmc__nationality1','UNK',NULL),
							(@F_BANK_ID,'tpmc__nationality2',NULL,NULL),
							(@F_BANK_ID,'tpmc__nationality3',NULL,NULL),
							(@F_BANK_ID,'tpmc__residence',NULL,NULL),
							(@F_BANK_ID,'tpmc__email',NULL,255),
							(@F_BANK_ID,'tpmc__occupation',NULL,255),
							(@F_BANK_ID,'tpmc__employer_name',NULL,255),
							(@F_BANK_ID,'tpmc__deceased',NULL,NULL),
							(@F_BANK_ID,'tpmc__date_deceased',NULL,19),
							(@F_BANK_ID,'tpmc__tax_number',NULL,100),
							(@F_BANK_ID,'tpmc__tax_reg_number',NULL,100),
							(@F_BANK_ID,'tpmc__source_of_wealth',NULL,255),
							(@F_BANK_ID,'tpmc__comments',NULL,8000),
							(@F_BANK_ID,'tp__gender','U',NULL),
							(@F_BANK_ID,'tp__title',NULL,30),
							(@F_BANK_ID,'tp__first_name','n/a',100),
							(@F_BANK_ID,'tp__middle_name',NULL,100),
							(@F_BANK_ID,'tp__prefix',NULL,100),
							(@F_BANK_ID,'tp__last_name','n/a',100),
							(@F_BANK_ID,'tp__birthdate','1753-01-01T00:00:00',19),
							(@F_BANK_ID,'tp__birth_place',NULL,255),
							(@F_BANK_ID,'tp__mothers_name',NULL,100),
							(@F_BANK_ID,'tp__alias',NULL,100),
							(@F_BANK_ID,'tp__ssn',NULL,25),
							(@F_BANK_ID,'tp__passport_number',NULL,255),
							(@F_BANK_ID,'tp__passport_country',NULL,NULL),
							(@F_BANK_ID,'tp__id_number',NULL,25),
							(@F_BANK_ID,'tp__nationality1','UNK',NULL),
							(@F_BANK_ID,'tp__nationality2',NULL,NULL),
							(@F_BANK_ID,'tp__nationality3',NULL,NULL),
							(@F_BANK_ID,'tp__residence',NULL,NULL),
							(@F_BANK_ID,'tp__email',NULL,255),
							(@F_BANK_ID,'tp__occupation',NULL,255),
							(@F_BANK_ID,'tp__employer_name',NULL,255),
							(@F_BANK_ID,'tp__deceased',NULL,NULL),
							(@F_BANK_ID,'tp__date_deceased',NULL,19),
							(@F_BANK_ID,'tp__tax_number',NULL,100),
							(@F_BANK_ID,'tp__tax_reg_number',NULL,100),
							(@F_BANK_ID,'tp__source_of_wealth',NULL,255),
							(@F_BANK_ID,'tp__comments',NULL,8000),
							(@F_BANK_ID,'tpi__type','4',NULL),
							(@F_BANK_ID,'tpi__number','n/a',255),
							(@F_BANK_ID,'tpi__issue_date',NULL,19),
							(@F_BANK_ID,'tpi__expiry_date',NULL,19),
							(@F_BANK_ID,'tpi__issued_by',NULL,255),
							(@F_BANK_ID,'tpi__issue_country','UNK',NULL),
							(@F_BANK_ID,'tpi__comments',NULL,8000),
							(@F_BANK_ID,'tfc__foreign_currency_code','CHF',NULL),
							(@F_BANK_ID,'tfc__foreign_amount','0.01',NULL),
							(@F_BANK_ID,'tfc__foreign_exchange_rate',NULL,NULL),
							(@F_BANK_ID,'tadr__address_type','1',NULL),
							(@F_BANK_ID,'tadr__address','n/a',100),
							(@F_BANK_ID,'tadr__town',NULL,255),
							(@F_BANK_ID,'tadr__city','n/a',255),
							(@F_BANK_ID,'tadr__zip',NULL,10),
							(@F_BANK_ID,'tadr__country_code','UNK',NULL),
							(@F_BANK_ID,'tadr__state',NULL,2),
							(@F_BANK_ID,'tadr__comments',NULL,8000),
							(@F_BANK_ID,'tph__tph_contact_type','1',NULL),
							(@F_BANK_ID,'tph__tph_communication_type','6',NULL),
							(@F_BANK_ID,'tph__tph_country_prefix',NULL,4),
							(@F_BANK_ID,'tph__tph_number','n/a',50),
							(@F_BANK_ID,'tph__tph_extension',NULL,10),
							(@F_BANK_ID,'tph__comments',NULL,8000),
							(@F_BANK_ID,'rpt__significance','10',NULL),
							(@F_BANK_ID,'rpt__reason',NULL,8000),
							(@F_BANK_ID,'rpt__comments',NULL,8000),
							(@F_BANK_ID,'prir__gender',NULL,NULL),
							(@F_BANK_ID,'prir__title',NULL,30),
							(@F_BANK_ID,'prir__first_name','n/a',100),
							(@F_BANK_ID,'prir__middle_name',NULL,100),
							(@F_BANK_ID,'prir__prefix',NULL,100),
							(@F_BANK_ID,'prir__last_name','n/a',100),
							(@F_BANK_ID,'prir__birthdate',NULL,19),
							(@F_BANK_ID,'prir__birth_place',NULL,255),
							(@F_BANK_ID,'prir__mothers_name',NULL,100),
							(@F_BANK_ID,'prir__alias',NULL,100),
							(@F_BANK_ID,'prir__ssn',NULL,25),
							(@F_BANK_ID,'prir__passport_number',NULL,255),
							(@F_BANK_ID,'prir__passport_country',NULL,NULL),
							(@F_BANK_ID,'prir__id_number',NULL,25),
							(@F_BANK_ID,'prir__nationality1',NULL,NULL),
							(@F_BANK_ID,'prir__nationality2',NULL,NULL),
							(@F_BANK_ID,'prir__nationality3',NULL,NULL),
							(@F_BANK_ID,'prir__residence',NULL,NULL),
							(@F_BANK_ID,'prir__email',NULL,255),
							(@F_BANK_ID,'prir__occupation',NULL,255),
							(@F_BANK_ID,'prir__employer_name',NULL,255),
							(@F_BANK_ID,'prir__deceased',NULL,NULL),
							(@F_BANK_ID,'prir__date_deceased',NULL,19),
							(@F_BANK_ID,'prir__tax_number',NULL,100),
							(@F_BANK_ID,'prir__tax_reg_number',NULL,100),
							(@F_BANK_ID,'prir__source_of_wealth',NULL,255),
							(@F_BANK_ID,'prir__comments',NULL,8000),
							(@F_BANK_ID,'rp__schema_version',@scheme,25),
							(@F_BANK_ID,'rp__report_date',NULL,19),
							(@F_BANK_ID,'tamc__account_category','OTHER',NULL),
							(@F_BANK_ID,'ta__account_category',NULL,NULL),
							(@F_BANK_ID,'af__currency_code','CHF',NULL),
							(@F_BANK_ID,'af__currency_balance','0',30),
							(@F_BANK_ID,'af__currency_balance_date',NULL,19),
							(@F_BANK_ID,'tamc__account_type','14',NULL),
							(@F_BANK_ID,'ta__account_type','14',NULL),
							(@F_BANK_ID,'tr__transaction_type_code','B2BWT',NULL),
							(@F_BANK_ID,'are__account_entity_relation','OTHER',NULL),
							(@F_BANK_ID,'rdr_valid_from','1753-01-01T00:00:00',19),
							(@F_BANK_ID,'rdr_is_approx_from_date',NULL,1),
							(@F_BANK_ID,'rdr_valid_to',NULL,19),
							(@F_BANK_ID,'rdr_is_approx_to_date',NULL,1);
							


						INSERT INTO [FAF].[FA_MROS_VERSION_SUPPORT_SPECIAL]
							([userbk_nr],
							[ID],
							[value1],
							[value2],
							[comments])
						VALUES
							(@F_BANK_ID,-1,@code,convert(varchar,sysdatetime(),120),'codes version/ updates date'),
							(@F_BANK_ID,0,@Version,@scheme,'country ISO/ scheme version'),
							(@F_BANK_ID,1,NULL,'n/a','tr__transmode_code makes transaction_location mandatory'),
							(@F_BANK_ID,2,NULL,'n/a','tr__transmode_code makes transaction_location mandatory'),
							(@F_BANK_ID,3,NULL,'n/a','tr__transmode_code makes transmode_comment mandatory'),
							(@F_BANK_ID,4,NULL,'0','tr__transmode_code makes amount_local = 0'),
							(@F_BANK_ID,5,'ok','Cancellation / Refund','Cancellation in tr__comments'),
							(@F_BANK_ID,6,'4','n/a','tpi__type makes tpi__comments mandatory'),
							(@F_BANK_ID,7,'3','4','tadr__address_type for buisiness'),
							(@F_BANK_ID,8,'1','3','tadr__address_type for private'),
							(@F_BANK_ID,9,'2','3','tadr__address_type for partners'),		
							(@F_BANK_ID,10,'2','n/a','tph__tph_contact_type makes tph__comments mandatory'),
							(@F_BANK_ID,11,'ok','4','tph__tph_contact_type for report head'),
							(@F_BANK_ID,12,'4','n/a','tph__tph_communication_type makes tph__comments mandatory'),
							(@F_BANK_ID,13,'ok','1','tph__tph_communication_type for report head: phone'),
							(@F_BANK_ID,14,'ok','3','tph__tph_communication_type for report head: e-mail'),
							(@F_BANK_ID,15,'ok','CH','tadr__country_code for report head'),	
							(@F_BANK_ID,16,'ok','0','tamc__balance when its mandatory'),
							(@F_BANK_ID,17,'ok','0','ta__balance when its mandatory'),
							(@F_BANK_ID,18,'1','2','tamc__status_code: opened / closed'),
							(@F_BANK_ID,19,'1','2','ta__status_code: opened / closed'),
							(@F_BANK_ID,20,'6','n/a','role of related person makes comments mandatory'),
							(@F_BANK_ID,21,'OTHER','n/a','role of related entity makes comments mandatory'),
							(@F_BANK_ID,22,'CHF','0','iso_wrg_cd does not make tamc__beneficiary mandatory'),
							(@F_BANK_ID,23,'CHF','0','iso_wrg_cd does not make ta__beneficiary mandatory'),
							(@F_BANK_ID,24,NULL,NULL,'tamc__account_type makes tamc__comments mandatory'),    --not used in scheme 5
							(@F_BANK_ID,25,NULL,NULL,'ta__account_type makes ta__comments mandatory'),        --not used in scheme 5
							(@F_BANK_ID,26,'ok','14','tamc__role for account owner'),
							--27 not used
							(@F_BANK_ID,28,'ok','1','temc__business_closed when its not null'),
							(@F_BANK_ID,29,'ok','1','te__business_closed when its not null'),
							(@F_BANK_ID,30,'0','1','partner_flag makes tamc__is_primary mandatory'),
							(@F_BANK_ID,31,'0','1','partner_flag makes ta__is_primary mandatory'),
							(@F_BANK_ID,32,'4','n/a','temc__incorporation_legal_form makes temc__comments mandatory'),
							(@F_BANK_ID,33,'4','n/a','te__incorporation_legal_form makes te__comments mandatory'),
							(@F_BANK_ID,34,'ok','1','tpmc__deceased when its not null'),
							(@F_BANK_ID,35,'ok','1','tp__deceased when its not null'),
							(@F_BANK_ID,36,'10','n/a','rpt__significance makes rpt__reason mandatory'),
							(@F_BANK_ID,37,'ok','ok','usage branch in t_account_my_client/t_account'),
							(@F_BANK_ID,39,'ok','ok','usage beneficiary in t_account_my_client/t_account'),
							(@F_BANK_ID,40,'ok','ok','usage beneficiary_comment in t_account_my_client/t_account'),
							(@F_BANK_ID,41,'ok','ok','usage role aggregation for person connected with entity that owns t_account_my_client/t_account'),
							(@F_BANK_ID,45,'ok',NULL,'usage indicators checking'),
							(@F_BANK_ID,47,'ok','ok','usage MV replacement of addresses for t_person_my_client/t_person'),
							(@F_BANK_ID,48,'ok','ok','usage MV replacement of identification for t_person_my_client/t_person'),
							(@F_BANK_ID,49,'ok','ok','usage MV replacement of addresses for t_entity_my_client/t_entity'),
							(@F_BANK_ID,50,'ok',NULL,'usage empty related_persons for t_account_my_client/t_account'), 
							(@F_BANK_ID,51,'ok','ok','from_funds_comment/to_funds_comment filling'),
							--52 not used
							(@F_BANK_ID,53,'ok','0','significance code for requested clients'),
							(@F_BANK_ID,54,'1','1','incorporation_legal_form for partnerships'),
							(@F_BANK_ID,55,'no','no','tax_reg_number for partnerships'),
							--56 not used
							(@F_BANK_ID,57,'ok','6','identification for entity as signatory: type'),
							(@F_BANK_ID,58,'ok','ok','identification for entity as signatory: number = uid_nr'),
							(@F_BANK_ID,59,'ok','CH','identification for entity as signatory: country'),
							(@F_BANK_ID,60,'ok','19','tamc__role for account owner without links'),
							(@F_BANK_ID,61,'ok','CARD_OPERATION','default value for special_mark for client <--> account payments'),
							--62 not used 
							(@F_BANK_ID,69,'Twint AG','TWINTBIC','default values for institution_name and swift for TWINT payments'),
							--79 not used
							(@F_BANK_ID,80,'ok',@scheme,'scheme 5: constant for schema_version'),
							--81 not used
							--82 not used
							(@F_BANK_ID,83,'WITHD','DEPAC','scheme 5: transaction_type_code: withdrawal code/deposit code'),
							(@F_BANK_ID,86,'ok',NULL,'scheme 5: using account_funds for t_account_my_client/t_account'),
							--88 not used
							(@F_BANK_ID,89,'ok',NULL,'scheme 5: using account_category for t_account_my_client/t_account'),
							(@F_BANK_ID,90,'ACCNT','ACCNT','scheme 5: values for account_category: iban/account number'),
							(@F_BANK_ID,91,'OTHER','MOB','scheme 5: values for account_category: unknown/TWINT'),
							--100 not used
							--101 not used
							--102 not used
							(@F_BANK_ID,103,'ok','ok','do not check that ext_ref is iban for TWINT payments 60/70'),
							(@F_BANK_ID,105,NULL,'1','relation_date_range is mandatory for related_person/is_approx_from_date default'),
							(@F_BANK_ID,107,'ok','ok','reporting_user_code usage/reporting_person elimination'),
							(@F_BANK_ID,108,'ok','ok','status_date/submission_date with 00:00:00 instead of time'),
							--109 not used
							(@F_BANK_ID,112,'ok',NULL,'turn on all comments'),
							(@F_BANK_ID,114,'4',NULL,'address_type for the reporting person'),
							(@F_BANK_ID,115,'17530101','22000101','left and right limits for dates'),
							(@F_BANK_ID,116,'CANCT','CANCL','report_code that demands only closed accounts for transaction reports/activity'),
							--120 not used
							(@F_BANK_ID,121,'ok','3','eliminate e-mails from phones/MROS_value (ref_type=7) for e-mails'),
							(@F_BANK_ID,122,'ok','INET','eliminate the code from phones/urls code'),
							--123 not used
							(@F_BANK_ID,124,'ok','ok','transmode_code elimination/transmode_comment elimination'),
							--(@F_BANK_ID,125,'CANCT','n/a','report_code makes fiu_ref_number mandatory/default value for fiu_ref_number'),
							--(@F_BANK_ID,126,'CANCL','n/a','report_code makes fiu_ref_number mandatory/default value for fiu_ref_number'),
							(@F_BANK_ID,127,'ok',NULL,'only institution_name, swift, account, comments are available in t_account'),
							(@F_BANK_ID,128,'ok',NULL,'role instead of significance for report_party'),
							(@F_BANK_ID,129,'ok','26','default funds_code for cash operations'),
							(@F_BANK_ID,130,'ok',NULL,'transaction_type_code is based on key_cd'),
							(@F_BANK_ID,131,'B2BWT','CASHT','transaction_type_code is based on key_cd'),
							(@F_BANK_ID,132,'MOMOT','POSAL','transaction_type_code is based on key_cd'),
							(@F_BANK_ID,133,'ok','BRNR','additional_information usage / constant for info_type'),
							(@F_BANK_ID,137,'ok',NULL,'there is iban-checking for @iban_txt');
					end;

				if @Version = 'LI'
					begin
						INSERT INTO [FAF].[FA_MROS_VERSION_SUPPORT_DEFAULT]
							([userbk_nr],
							[name],
							[value],
							[length])
						VALUES
							(@F_BANK_ID,'rp__rentity_id',NULL,NULL),
							(@F_BANK_ID,'rp__rentity_branch',NULL,255),
							(@F_BANK_ID,'rp__submission_code','E',NULL),
							(@F_BANK_ID,'rp__report_code',NULL,NULL),
							(@F_BANK_ID,'rp__entity_reference',NULL,255),
							(@F_BANK_ID,'rp__fiu_ref_number',NULL,255),
							(@F_BANK_ID,'rp__submission_date',NULL,19),
							(@F_BANK_ID,'rp__currency_code_local','CHF',NULL),
							(@F_BANK_ID,'rp__reason',NULL,8000),
							(@F_BANK_ID,'rp__action',NULL,8000),
							(@F_BANK_ID,'tr__transactionnumber','n/a',50),
							(@F_BANK_ID,'tr__internal_ref_number',NULL,50),
							(@F_BANK_ID,'tr__transaction_location',NULL,255),
							(@F_BANK_ID,'tr__transaction_description',NULL,8000),
							(@F_BANK_ID,'tr__date_transaction','1900-01-01T00:00:00',19),
							(@F_BANK_ID,'tr__teller',NULL,50),
							(@F_BANK_ID,'tr__authorized',NULL,50),
							(@F_BANK_ID,'tr__late_deposit',NULL,NULL),
							(@F_BANK_ID,'tr__date_posting',NULL,19),
							(@F_BANK_ID,'tr__value_date',NULL,19),
							(@F_BANK_ID,'tr__transmode_code','-',NULL),
							(@F_BANK_ID,'tr__transmode_comment',NULL,50),
							(@F_BANK_ID,'tr__amount_local','0.01',NULL),
							(@F_BANK_ID,'tfmc__from_funds_code','FTBU',NULL),
							(@F_BANK_ID,'tfmc__from_funds_comment',NULL,255),
							(@F_BANK_ID,'tfmc__from_country','-',NULL),
							(@F_BANK_ID,'tf__from_funds_code','FTBU',NULL),
							(@F_BANK_ID,'tf__from_funds_comment',NULL,255),
							(@F_BANK_ID,'tf__from_country','-',NULL),
							(@F_BANK_ID,'ttmc__to_funds_code','FTBU',NULL),
							(@F_BANK_ID,'ttmc__to_funds_comment',NULL,255),
							(@F_BANK_ID,'ttmc__to_country','-',NULL),
							(@F_BANK_ID,'tt__to_funds_code','FTBU',NULL),
							(@F_BANK_ID,'tt__to_funds_comment',NULL,255),
							(@F_BANK_ID,'tt__to_country','-',NULL),
							(@F_BANK_ID,'tr__comments',NULL,8000),
							(@F_BANK_ID,'tamc__institution_name',NULL,255),
							(@F_BANK_ID,'tamc__institution_code',NULL,50),
							(@F_BANK_ID,'tamc__swift','n/a',11),
							(@F_BANK_ID,'tamc__non_bank_institution',NULL,NULL),
							(@F_BANK_ID,'tamc__branch',NULL,255),
							(@F_BANK_ID,'tamc__account','n/a',255),
							(@F_BANK_ID,'tamc__currency_code',NULL,NULL),
							(@F_BANK_ID,'tamc__account_name',NULL,255),
							(@F_BANK_ID,'tamc__iban',NULL,34),
							(@F_BANK_ID,'tamc__client_number',NULL,30),
							(@F_BANK_ID,'tamc__personal_account_type','-',NULL),
							(@F_BANK_ID,'tamc__is_primary',NULL,NULL),
							(@F_BANK_ID,'tamc__role','APVP',NULL),
							(@F_BANK_ID,'tamc__opened',NULL,19),
							(@F_BANK_ID,'tamc__closed',NULL,19),
							(@F_BANK_ID,'tamc__balance','0',NULL),
							(@F_BANK_ID,'tamc__date_balance',NULL,19),
							(@F_BANK_ID,'tamc__status_code','-',NULL),
							(@F_BANK_ID,'tamc__status_date',NULL,19),
							(@F_BANK_ID,'tamc__beneficiary',NULL,50),
							(@F_BANK_ID,'tamc__beneficiary_comment',NULL,255),
							(@F_BANK_ID,'tamc__comments',NULL,8000),
							(@F_BANK_ID,'ta__institution_name',NULL,255),
							(@F_BANK_ID,'ta__institution_code',NULL,50),
							(@F_BANK_ID,'ta__swift','n/a',11),
							(@F_BANK_ID,'ta__non_bank_institution',NULL,NULL),
							(@F_BANK_ID,'ta__branch',NULL,255),
							(@F_BANK_ID,'ta__account','n/a',255),
							(@F_BANK_ID,'ta__currency_code',NULL,NULL),
							(@F_BANK_ID,'ta__account_name',NULL,255),
							(@F_BANK_ID,'ta__iban',NULL,34),
							(@F_BANK_ID,'ta__client_number',NULL,30),
							(@F_BANK_ID,'ta__personal_account_type','-',NULL),
							(@F_BANK_ID,'ta__is_primary',NULL,NULL),
							(@F_BANK_ID,'ta__role','APVP',NULL),
							(@F_BANK_ID,'ta__opened',NULL,19),
							(@F_BANK_ID,'ta__closed',NULL,19),
							(@F_BANK_ID,'ta__balance','0',NULL),
							(@F_BANK_ID,'ta__date_balance',NULL,19),
							(@F_BANK_ID,'ta__status_code','-',NULL),
							(@F_BANK_ID,'ta__beneficiary',NULL,50),
							(@F_BANK_ID,'ta__beneficiary_comment',NULL,255),
							(@F_BANK_ID,'ta__comments',NULL,8000),
							(@F_BANK_ID,'temc__name','n/a',255),
							(@F_BANK_ID,'temc__commercial_name',NULL,255),
							(@F_BANK_ID,'temc__incorporation_legal_form','ELOTH',NULL),
							(@F_BANK_ID,'temc__incorporation_number',NULL,50),
							(@F_BANK_ID,'temc__business',NULL,255),
							(@F_BANK_ID,'temc__email',NULL,255),
							(@F_BANK_ID,'temc__url',NULL,255),
							(@F_BANK_ID,'temc__incorporation_state',NULL,255),
							(@F_BANK_ID,'temc__incorporation_country_code','LI',NULL),
							(@F_BANK_ID,'temc__incorporation_date',NULL,19),
							(@F_BANK_ID,'temc__business_closed',NULL,NULL),
							(@F_BANK_ID,'temc__date_business_closed',NULL,19),
							(@F_BANK_ID,'temc__tax_number',NULL,100),
							(@F_BANK_ID,'temc__tax_reg_number',NULL,100),
							(@F_BANK_ID,'temc__comments',NULL,8000),
							(@F_BANK_ID,'te__name','n/a',255),
							(@F_BANK_ID,'te__commercial_name',NULL,255),
							(@F_BANK_ID,'te__incorporation_legal_form','ELOTH',NULL),
							(@F_BANK_ID,'te__incorporation_number',NULL,50),
							(@F_BANK_ID,'te__business',NULL,255),
							(@F_BANK_ID,'te__email',NULL,255),
							(@F_BANK_ID,'te__url',NULL,255),
							(@F_BANK_ID,'te__incorporation_state',NULL,255),
							(@F_BANK_ID,'te__incorporation_country_code','LI',NULL),
							(@F_BANK_ID,'te__incorporation_date',NULL,19),
							(@F_BANK_ID,'te__business_closed',NULL,NULL),
							(@F_BANK_ID,'te__date_business_closed',NULL,19),
							(@F_BANK_ID,'te__tax_number',NULL,100),
							(@F_BANK_ID,'te__tax_reg_number',NULL,100),
							(@F_BANK_ID,'te__comments',NULL,8000),
							(@F_BANK_ID,'tpmc__gender',NULL,NULL),
							(@F_BANK_ID,'tpmc__title',NULL,30),
							(@F_BANK_ID,'tpmc__first_name','n/a',100),
							(@F_BANK_ID,'tpmc__middle_name',NULL,100),
							(@F_BANK_ID,'tpmc__prefix',NULL,100),
							(@F_BANK_ID,'tpmc__last_name','n/a',100),
							(@F_BANK_ID,'tpmc__birthdate','1900-01-01T00:00:00',19),
							(@F_BANK_ID,'tpmc__birth_place',NULL,255),
							(@F_BANK_ID,'tpmc__mothers_name',NULL,100),
							(@F_BANK_ID,'tpmc__alias',NULL,100),
							(@F_BANK_ID,'tpmc__ssn',NULL,25),
							(@F_BANK_ID,'tpmc__passport_number',NULL,255),
							(@F_BANK_ID,'tpmc__passport_country',NULL,NULL),
							(@F_BANK_ID,'tpmc__id_number','UNBEKANNT',255),
							(@F_BANK_ID,'tpmc__nationality1',NULL,NULL),
							(@F_BANK_ID,'tpmc__nationality2',NULL,NULL),
							(@F_BANK_ID,'tpmc__nationality3',NULL,NULL),
							(@F_BANK_ID,'tpmc__residence',NULL,NULL),
							(@F_BANK_ID,'tpmc__email',NULL,255),
							(@F_BANK_ID,'tpmc__occupation',NULL,255),
							(@F_BANK_ID,'tpmc__employer_name',NULL,255),
							(@F_BANK_ID,'tpmc__deceased',NULL,NULL),
							(@F_BANK_ID,'tpmc__date_deceased',NULL,19),
							(@F_BANK_ID,'tpmc__tax_number',NULL,100),
							(@F_BANK_ID,'tpmc__tax_reg_number',NULL,100),
							(@F_BANK_ID,'tpmc__source_of_wealth',NULL,255),
							(@F_BANK_ID,'tpmc__comments',NULL,8000),
							(@F_BANK_ID,'tp__gender',NULL,NULL),
							(@F_BANK_ID,'tp__title',NULL,30),
							(@F_BANK_ID,'tp__first_name','n/a',100),
							(@F_BANK_ID,'tp__middle_name',NULL,100),
							(@F_BANK_ID,'tp__prefix',NULL,100),
							(@F_BANK_ID,'tp__last_name','n/a',100),
							(@F_BANK_ID,'tp__birthdate','1900-01-01T00:00:00',19),
							(@F_BANK_ID,'tp__birth_place',NULL,255),
							(@F_BANK_ID,'tp__mothers_name',NULL,100),
							(@F_BANK_ID,'tp__alias',NULL,100),
							(@F_BANK_ID,'tp__ssn',NULL,25),
							(@F_BANK_ID,'tp__passport_number',NULL,255),
							(@F_BANK_ID,'tp__passport_country',NULL,NULL),
							(@F_BANK_ID,'tp__id_number','UNBEKANNT',255),
							(@F_BANK_ID,'tp__nationality1',NULL,NULL),
							(@F_BANK_ID,'tp__nationality2',NULL,NULL),
							(@F_BANK_ID,'tp__nationality3',NULL,NULL),
							(@F_BANK_ID,'tp__residence',NULL,NULL),
							(@F_BANK_ID,'tp__email',NULL,255),
							(@F_BANK_ID,'tp__occupation',NULL,255),
							(@F_BANK_ID,'tp__employer_name',NULL,255),
							(@F_BANK_ID,'tp__deceased',NULL,NULL),
							(@F_BANK_ID,'tp__date_deceased',NULL,19),
							(@F_BANK_ID,'tp__tax_number',NULL,100),
							(@F_BANK_ID,'tp__tax_reg_number',NULL,100),
							(@F_BANK_ID,'tp__source_of_wealth',NULL,255),
							(@F_BANK_ID,'tp__comments',NULL,8000),
							(@F_BANK_ID,'tpi__type','-',NULL),
							(@F_BANK_ID,'tpi__number','n/a',255),
							(@F_BANK_ID,'tpi__issue_date',NULL,19),
							(@F_BANK_ID,'tpi__expiry_date',NULL,19),
							(@F_BANK_ID,'tpi__issued_by',NULL,255),
							(@F_BANK_ID,'tpi__issue_country','-',NULL),
							(@F_BANK_ID,'tpi__comments',NULL,8000),
							(@F_BANK_ID,'tfc__foreign_currency_code','CHF',NULL),
							(@F_BANK_ID,'tfc__foreign_amount','0.01',NULL),
							(@F_BANK_ID,'tfc__foreign_exchange_rate',NULL,NULL),
							(@F_BANK_ID,'tadr__address_type','-',NULL),
							(@F_BANK_ID,'tadr__address','n/a',100),
							(@F_BANK_ID,'tadr__town',NULL,255),
							(@F_BANK_ID,'tadr__city','n/a',255),
							(@F_BANK_ID,'tadr__zip',NULL,10),
							(@F_BANK_ID,'tadr__country_code','-',NULL),
							(@F_BANK_ID,'tadr__state',NULL,255),
							(@F_BANK_ID,'tadr__comments',NULL,8000),
							(@F_BANK_ID,'tph__tph_contact_type','-',NULL),
							(@F_BANK_ID,'tph__tph_communication_type','-',NULL),
							(@F_BANK_ID,'tph__tph_country_prefix',NULL,4),
							(@F_BANK_ID,'tph__tph_number','n/a',50),
							(@F_BANK_ID,'tph__tph_extension',NULL,10),
							(@F_BANK_ID,'tph__comments',NULL,8000),
							(@F_BANK_ID,'rpt__significance',NULL,NULL),
							(@F_BANK_ID,'rpt__reason','n/a',8000),
							(@F_BANK_ID,'rpt__comments',NULL,8000),
							(@F_BANK_ID,'prir__gender',NULL,NULL),
							(@F_BANK_ID,'prir__title',NULL,30),
							(@F_BANK_ID,'prir__first_name','n/a',100),
							(@F_BANK_ID,'prir__middle_name',NULL,100),
							(@F_BANK_ID,'prir__prefix',NULL,100),
							(@F_BANK_ID,'prir__last_name','n/a',100),
							(@F_BANK_ID,'prir__birthdate',NULL,19),
							(@F_BANK_ID,'prir__birth_place',NULL,255),
							(@F_BANK_ID,'prir__mothers_name',NULL,100),
							(@F_BANK_ID,'prir__alias',NULL,100),
							(@F_BANK_ID,'prir__ssn',NULL,25),
							(@F_BANK_ID,'prir__passport_number',NULL,255),
							(@F_BANK_ID,'prir__passport_country',NULL,NULL),
							(@F_BANK_ID,'prir__id_number','UNBEKANNT',255),
							(@F_BANK_ID,'prir__nationality1',NULL,NULL),
							(@F_BANK_ID,'prir__nationality2',NULL,NULL),
							(@F_BANK_ID,'prir__nationality3',NULL,NULL),
							(@F_BANK_ID,'prir__residence',NULL,NULL),
							(@F_BANK_ID,'prir__email',NULL,255),
							(@F_BANK_ID,'prir__occupation',NULL,255),
							(@F_BANK_ID,'prir__employer_name',NULL,255),
							(@F_BANK_ID,'prir__deceased',NULL,NULL),
							(@F_BANK_ID,'prir__date_deceased',NULL,19),
							(@F_BANK_ID,'prir__tax_number',NULL,100),
							(@F_BANK_ID,'prir__tax_reg_number',NULL,100),
							(@F_BANK_ID,'prir__source_of_wealth',NULL,255),
							(@F_BANK_ID,'prir__comments',NULL,8000),
							(@F_BANK_ID,'rp__schema_version',@scheme,25),
							(@F_BANK_ID,'rp__report_date',NULL,19),
							(@F_BANK_ID,'tr__transaction_type_code','-',NULL),
							(@F_BANK_ID,'tr__transaction_status',NULL,NULL),
							(@F_BANK_ID,'tamc__institution_country',NULL,NULL),
							(@F_BANK_ID,'ta__institution_country',NULL,NULL),
							(@F_BANK_ID,'af__currency_code','-',NULL),
							(@F_BANK_ID,'af__currency_balance',NULL,NULL),
							(@F_BANK_ID,'af__currency_balance_date',NULL,19),
							(@F_BANK_ID,'tamc__account_type','-',NULL),
							(@F_BANK_ID,'ta__account_type','-',NULL),
							(@F_BANK_ID,'tamc__account_category','-',NULL),
							(@F_BANK_ID,'ta__account_category','-',NULL),
							(@F_BANK_ID,'are__account_entity_relation','-',NULL),
							(@F_BANK_ID,'rdr_valid_from','1901-01-01T00:00:00',19),
							(@F_BANK_ID,'rdr_is_approx_from_date',NULL,1),
							(@F_BANK_ID,'rdr_valid_to',NULL,19),
							(@F_BANK_ID,'rdr_is_approx_to_date',NULL,1);


						INSERT INTO [FAF].[FA_MROS_VERSION_SUPPORT_SPECIAL]
							([userbk_nr],
							[ID],
							[value1],
							[value2],
							[comments])
						VALUES
							(@F_BANK_ID,-1,@code,convert(varchar,sysdatetime(),120),'codes version/ updates date'),
							(@F_BANK_ID,0,@Version,@scheme,'country ISO/ scheme version'),
							(@F_BANK_ID,1,'TMB','n/a','tr__transmode_code makes transaction_location mandatory'),
							(@F_BANK_ID,3,'-','n/a','tr__transmode_code makes transmode_comment mandatory'),
							(@F_BANK_ID,5,'ok','Cancellation / Refund','Cancellation in tr__comments'),
							(@F_BANK_ID,6,'D','n/a','tpi__type makes tpi__comments mandatory'),
							(@F_BANK_ID,7,'3','3','tadr__address_type for buisiness'),
							(@F_BANK_ID,8,'1','1','tadr__address_type for private'),
							(@F_BANK_ID,9,'2','1','tadr__address_type for partners'),		
							(@F_BANK_ID,10,'2','n/a','tph__tph_contact_type makes tph__comments mandatory'),
							(@F_BANK_ID,11,'ok','4','tph__tph_contact_type for report head'),
							(@F_BANK_ID,13,'ok','L','tph__tph_communication_type for report head: phone'),
							(@F_BANK_ID,14,'ok','E','tph__tph_communication_type for report head: e-mail'),
							(@F_BANK_ID,15,'ok','-','tadr__country_code for report head'),	
							(@F_BANK_ID,16,'ok','0','tamc__balance when its mandatory'),
							(@F_BANK_ID,17,'ok','0','ta__balance when its mandatory'),
							(@F_BANK_ID,18,'ASA','ASI','tamc__status_code: opened / closed'),
							(@F_BANK_ID,19,'ASA','ASI','ta__status_code: opened / closed'),
							(@F_BANK_ID,20,'-','n/a','role of related person makes comments mandatory'),
							(@F_BANK_ID,21,'-','n/a','role of related entity makes comments mandatory'),
							(@F_BANK_ID,24,'-','n/a','tamc__personal_account_type makes tamc__comments mandatory'),
							(@F_BANK_ID,25,'-','n/a','ta__personal_account_type makes ta__comments mandatory'),
							(@F_BANK_ID,26,'ok','APVP','tamc__role for account owner'),
							--27 not used
							(@F_BANK_ID,28,'ok','1','temc__business_closed when its not null'),
							(@F_BANK_ID,29,'ok','1','te__business_closed when its not null'),
							(@F_BANK_ID,30,'0','1','partner_flag makes tamc__is_primary mandatory'),
							(@F_BANK_ID,31,'0','1','partner_flag makes ta__is_primary mandatory'),
							(@F_BANK_ID,32,'ELOTH','n/a','temc__incorporation_legal_form makes temc__comments mandatory'),
							(@F_BANK_ID,33,'ELOTH','n/a','te__incorporation_legal_form makes te__comments mandatory'),
							(@F_BANK_ID,34,'ok','1','tpmc__deceased when its not null'),
							(@F_BANK_ID,35,'ok','1','tp__deceased when its not null'),
							(@F_BANK_ID,38,'ok','ok','put iban in account for t_account_my_client/t_account'),
							(@F_BANK_ID,42,'ok','ok','usage id_number for t_person_my_client/t_person'),
							(@F_BANK_ID,43,'ok','ok','usage phones for t_entity_my_client/t_entity'),
							(@F_BANK_ID,44,'ok','ok','uppercase in last_name for t_person_my_client/t_person'),
							(@F_BANK_ID,46,'ok',NULL,'usage comments instead of mros_value in state'),
							(@F_BANK_ID,50,NULL,NULL,'usage empty related_persons for t_account_my_client/t_account'),
							--52 not used
							--56 not used
							(@F_BANK_ID,61,'ok','CARD_OPERATION','default value for special_mark for client <--> account payments'),
							--62 not used 
							(@F_BANK_ID,63,'ok',NULL,'Should the full data of a non-requsted Bank client be visible?'),
							(@F_BANK_ID,64,'ok','ok','uppercase ja/nein for t_person_my_client/t_person'),
							(@F_BANK_ID,65,'ok','ok','email for t_person_my_client & t_entity_my_client/t_person & t_entity'),
							(@F_BANK_ID,66,'ok','ok','usage of ref_type=25 for status_code for t_account_my_client/t_account'),
							(@F_BANK_ID,67,'ok','ok','uid_nr in tax_number for t_entity_my_client/t_entity'),
							(@F_BANK_ID,68,'ok','ok','uid_nr in tax_number for t_person_my_client/t_person'),
							(@F_BANK_ID,69,'Twint AG','TWINTBIC','default values for institution_name and swift for TWINT payments'),
							(@F_BANK_ID,70,'ok','ok','entity name is copied in commercial_name for t_entity_my_client/t_entity'),
							(@F_BANK_ID,71,'ok','60','kd_ausw_nr with such iddoc_cd in incorporation_number for t_entity_my_client'),
							(@F_BANK_ID,72,'ok','60','kd_ausw_nr with such iddoc_cd in incorporation_number for t_entity'),
							(@F_BANK_ID,73,'ok','0','aufheb_dat in date_balance and 0 in balance for closed t_account_my_client'),
							(@F_BANK_ID,74,'ok','0','aufheb_dat in date_balance and 0 in balance for closed t_account'),
							(@F_BANK_ID,75,NULL,'-','neutral code for composition in role for t_account_my_client/t_account'),
							(@F_BANK_ID,76,NULL,NULL,'code with the highest priority for composition in role for t_account_my_client/t_account'),     --not used in scheme 5.1
							(@F_BANK_ID,77,'ok',NULL,'usage of vt_typ_cd + _ + sb_sign_recht_cd in order to join VT with Reference_table'),
							(@F_BANK_ID,78,'ok','ok','kd_rstat_cd of partnership defines incorporation_legal_form as same as for entities for accounts/clients. It wins 54.'),
							(@F_BANK_ID,80,'ok',@scheme,'scheme 5: constant for schema_version'),
							--81 not used
							--82 not used
							(@F_BANK_ID,83,'TTBA','TTBE','scheme 5: transaction_type_code: withdrawal code/deposit code'),
							(@F_BANK_ID,84,'TSEX','TSSTO','scheme 5: transaction_status Done/Canceled'),
							(@F_BANK_ID,85,'ok','ok','scheme 5: using institution_country for t_account_my_client/t_account'),
							(@F_BANK_ID,86,'ok','ok','scheme 5: using account_funds for t_account_my_client/t_account'),
							(@F_BANK_ID,87,'1','1','scheme 5: collection_account value for t_account_my_client/t_account'),
							--88 not used
							(@F_BANK_ID,89,'ok','ok','scheme 5: using account_category for t_account_my_client/t_account'),
							(@F_BANK_ID,90,'IBAN','ACCNT','scheme 5: values for account_category: iban/account number'),
							(@F_BANK_ID,91,'-','MOB','scheme 5: values for account_category: unknown/TWINT'),
							(@F_BANK_ID,92,'ok',NULL,'not use roles collaboration'),
							(@F_BANK_ID,93,'-','-','scheme 5: neutral code for composition in account_entity_relation for t_account_my_client/t_account'),
							(@F_BANK_ID,94,'TTUE','TTSB','scheme 5: transaction_type_code: Payment/Cancelation code'),
							(@F_BANK_ID,95,'ok','ok','scheme 5: current date in status_date for t_account_my_client/t_account'),
							(@F_BANK_ID,96,'ok','LI','scheme 5: incorporation_country_code is mandatory for from_entity and to_entity/default value for a bank'),
							(@F_BANK_ID,97,'ok',NULL,'Not using Branch and its number in transaction_location, just name'),
							(@F_BANK_ID,98,'ok','ok','usage isnull(kd_pep_cd,kd_pep_cd_auto) instaed of kd_pep_cd in id_number for t_person_my_client/t_person'),
							(@F_BANK_ID,99,'ok',NULL,'foreign_exchange_rate is calculated'),
							--100 not used
							--101 not used
							--102 not used
							(@F_BANK_ID,104,'ok','ok','tax_reg_number is not filled for my_client/not my_client'),
							(@F_BANK_ID,105,'ok',NULL,'relation_date_range is mandatory for related_person/is_approx_from_date default'),
							(@F_BANK_ID,106,'ok','n/a','make t_entity in account not my client in STR/default for name'),
							(@F_BANK_ID,107,'ok','ok','reporting_user_code usage/reporting_person elimination'),
							(@F_BANK_ID,108,'ok',NULL,'status_date/submission_date with 00:00:00 instead of time'),
							--109 not used
							(@F_BANK_ID,110,'ok',NULL,'edit_kt_nr is used in account when iban is NULL in activity'),
							(@F_BANK_ID,111,'ok','ok','saldo_kwrg instead of saldo_bwrg in balance for t_account/t_account_my_client'),
							(@F_BANK_ID,113,'ok','ok','from_foreign_currency/to_foreign_currency for non my_client'),
							(@F_BANK_ID,114,'-',NULL,'address_type for the reporting person'),
							(@F_BANK_ID,115,'17530101','20900101','left and right limits for dates'),
							(@F_BANK_ID,117,'ok','CHF','scheme 5: mandatory of account_funds for t_account_my_client if currency<>CHF'),
							(@F_BANK_ID,118,'ok','CHF','scheme 5: mandatory of account_funds for t_account if currency<>CHF'),
							(@F_BANK_ID,119,'ok','unknown','location elimination/default for mandatory fields'),
							--120 not used
							(@F_BANK_ID,121,'ok','E','eliminate e-mails from phones/MROS_value (ref_type=7) for e-mails'),
							(@F_BANK_ID,122,'ok','INET','eliminate the code from phones/urls code'),
							(@F_BANK_ID,134,'ok',NULL,'om_text_typ_cd=8 goes into transaction.comments'),
							(@F_BANK_ID,135,'2','ok','address_type = other/write address type in comments'),
							(@F_BANK_ID,136,'ok','AEVP','usage of related_entities instead of t_entity/role');
					end;

				print('paramaters were updated for userbk_nr = '+cast(@F_BANK_ID as varchar) + ' (version = ' + @Version + ')');
			end;
		else
			begin
				print('Attention! Parameters can not be filled automatically for userbk_nr = ' + cast(@F_BANK_ID as varchar) + ', try manual installation for the bank.');
			end;
	end;
	set @F_BANK_ID = NULL;
	set @Version = NULL;
	set @ii = @ii+1;
end;
GO

