When trying to write a LINQ to SQL query you have to be mindful of what is supported as a translation from VB/C# into SQL. For example you can specify somestring.Trim() and this is translated into LTRIM(RTRIM(SOMESTRING)).
A lot of the time a suck-it-and-see approach is okay, but it can introduce runtime errors into programs. Fortunately there is a reference guide to help at http://msdn.microsoft.com/en-us/library/bb386970.aspx
One interesting find here is the SQLmethods class. This allows you to perform specific SQL methods that have no direct translation from CLR into LINQ to SQL.
Most of these are DateDiff computations, to permit you to compute the differences between two date values directly in SQL.