So, I\'m importing data from one database into another. There are about 5,000 records (so nothing ridiculous, but not small enough to eyeball). Is there an easy way to autom
I would make an extension iterator method that you could throw inline with your query, doing something like this:
public static IEnumerable Truncater(this IEnumerable s, int len)
{
foreach( var str in s )
{
if( str.Length > len )
{
string outStr = str.Substring(0, len);
Console.WriteLine(String.Format("Truncated {0} to {1}", str, outStr));
yield return outStr;
}
else
yield return str;
}
}