CREATE PROCEDURE [MIG_SET_PROJ_CONFIG_PREFS_Sp]
(
	 @InputProjectID NVARCHAR(MAX)
)
AS BEGIN
	-- The purpose of this stored procedure is to generate/populate the data in [MIG_PROJ_CONFIG] table.

	--DECLARE @proj INT
	DECLARE @c101 INT
	DECLARE @c102 INT
	DECLARE @c103 INT
	DECLARE @c104 INT
	DECLARE @c105 INT
	DECLARE @c106 INT
	DECLARE @c107 INT
	DECLARE @c108 INT
	DECLARE @c109 INT
	DECLARE @c110 INT
	DECLARE @c111 INT
	DECLARE @c112 INT
	DECLARE @c113 INT
	DECLARE @c114 INT
	DECLARE @c115 INT
	DECLARE @c116 INT
	DECLARE @c117 INT
	DECLARE @c119 INT
	DECLARE @c120 INT
	DECLARE @c121 INT
	DECLARE @c122 INT
	DECLARE @c123 INT
	DECLARE @c124 INT
	DECLARE @c125 INT
	DECLARE @c201 INT
	DECLARE @c202 INT
	DECLARE @c203 INT
	DECLARE @c204 INT
	DECLARE @c205 INT
	DECLARE @c206 INT
	DECLARE @c207 INT
	DECLARE @c208 INT
	DECLARE @c209 INT
	DECLARE @c210 INT
	DECLARE @c211 INT
	DECLARE @c212 INT
	DECLARE @c213 INT
	DECLARE @c214 INT
	DECLARE @c215 INT
	DECLARE @c216 INT
	DECLARE @c217 INT
	DECLARE @c218 INT
	DECLARE @c219 INT
	DECLARE @c220 INT
	DECLARE @c221 INT
	DECLARE @c223 INT
	DECLARE @c224 INT
	DECLARE @c225 INT
	DECLARE @c226 INT
	DECLARE @c227 INT
	DECLARE @c228 INT
	DECLARE @c229 INT
	DECLARE @c230 INT
	DECLARE @c231 INT
	DECLARE @c301 INT
	DECLARE @c302 INT
	DECLARE @c303 INT
	DECLARE @c304 INT
	DECLARE @c305 INT
	DECLARE @c306 INT
	DECLARE @c307 INT
	DECLARE @c308 INT
	DECLARE @c309 INT
	DECLARE @c310 INT
	DECLARE @c311 INT
	DECLARE @c313 INT
	DECLARE @c314 INT
	DECLARE @c401 INT
	DECLARE @c402 INT
	DECLARE @c403 INT
	DECLARE @c404 INT
	DECLARE @c405 INT
	DECLARE @c406 INT
	DECLARE @c407 INT
	DECLARE @c408 INT
	DECLARE @c409 INT
	DECLARE @c410 INT
	DECLARE @c411 INT

	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c101', @c101 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c102', @c102 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c103', @c103 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c104', @c104 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c105', @c105 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c106', @c106 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c107', @c107 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c108', @c108 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c109', @c109 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c110', @c110 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c111', @c111 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c112', @c112 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c113', @c113 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c114', @c114 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c115', @c115 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c116', @c116 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c117', @c117 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c119', @c119 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c120', @c120 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c121', @c121 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c122', @c122 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c123', @c123 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c124', @c124 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c125', @c125 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c201', @c201 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c202', @c202 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c203', @c203 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c204', @c204 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c205', @c205 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c206', @c206 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c207', @c207 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c208', @c208 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c209', @c209 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c210', @c210 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c211', @c211 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c212', @c212 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c213', @c213 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c214', @c214 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c215', @c215 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c216', @c216 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c217', @c217 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c218', @c218 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c219', @c219 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c220', @c220 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c221', @c221 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c223', @c223 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c224', @c224 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c225', @c225 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c226', @c226 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c227', @c227 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c228', @c228 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c229', @c229 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c230', @c230 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c231', @c231 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c301', @c301 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c302', @c302 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c303', @c303 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c304', @c304 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c305', @c305 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c306', @c306 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c307', @c307 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c308', @c308 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c309', @c309 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c310', @c310 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c311', @c311 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c313', @c313 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c314', @c314 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c401', @c401 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c402', @c402 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c403', @c403 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c404', @c404 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c405', @c405 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c406', @c406 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c407', @c407 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c408', @c408 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c409', @c409 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c410', @c410 OUTPUT 
	exec MIG_GET_PROJ_CONFIG_PREF_VALUE_Sp @InputProjectID, 'c411', @c411 OUTPUT 


	UPDATE MIG_PROJ_CONFIG
	SET
		c101 = @c101,
		c102 = @c102,
		c103 = @c103,
		c104 = @c104,
		c105 = @c105,
		c106 = @c106,
		c107 = @c107,
		c108 = @c108,
		c109 = @c109,
		c110 = @c110,
		c111 = @c111,
		c112 = @c112,
		c113 = @c113,
		c114 = @c114,
		c115 = @c115,
		c116 = @c116,
		c117 = @c117,
		c119 = @c119,
		c120 = @c120,
		c121 = @c121,
		c122 = @c122,
		c123 = @c123,
		c124 = @c124,
		c125 = @c125,
		c201 = @c201,
		c202 = @c202,
		c203 = @c203,
		c204 = @c204,
		c205 = @c205,
		c206 = @c206,
		c207 = @c207,
		c208 = @c208,
		c209 = @c209,
		c210 = @c210,
		c211 = @c211,
		c212 = @c212,
		c213 = @c213,
		c214 = @c214,
		c215 = @c215,
		c216 = @c216,
		c217 = @c217,
		c218 = @c218,
		c219 = @c219,
		c220 = @c220,
		c221 = @c221,
		c223 = @c223,
		c224 = @c224,
		c225 = @c225,
		c226 = @c226,
		c227 = @c227,
		c228 = @c228,
		c229 = @c229,
		c230 = @c230,
		c231 = @c231,
		c301 = @c301,
		c302 = @c302,
		c303 = @c303,
		c304 = @c304,
		c305 = @c305,
		c306 = @c306,
		c307 = @c307,
		c308 = @c308,
		c309 = @c309,
		c310 = @c310,
		c311 = @c311,
		c313 = @c313,
		c314 = @c314,
		c401 = @c401,
		c402 = @c402,
		c403 = @c403,
		c404 = @c404,
		c405 = @c405,
		c406 = @c406,
		c407 = @c407,
		c408 = @c408,
		c409 = @c409,
		c410 = @c410,
		c411 = @c411
	WHERE PROJ = @InputProjectID

END




