If it isn't already, put the data to be inserted into a staging table.In your query editor, set the output to text. Change YOUR_STAGING_TABLE and YOUR_TARGET_TABLE to the name of your table(s). Copy/Paste the results of this into a new window and execute it:SELECT 'SELECT MAX(LEN([' + name + '])) [length], ' + Convert(varchar(255), CASE WHEN system_type_id in (231, 239) THEN max_length / 2 ELSE max_length End) + ' [max allowed]FROM YOUR_STAGING_TABLE;'FROM sys.columnsWHERE object_id = object_id('YOUR_TARGET_TABLE')And system_type_id in (175, 239, 231, 167)