This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
When I call a Trim() on a string in a GroupBy Key (in 3.0 Beta) it is not translated to SQL like in other Queries. I wonder if GroupBy trasnlates any methods to SQL functions? |
|
|
Hi Tommy, Functions are supported on Grouping Keys as per normal, although we know of an issue with DB2 specifically. e.g. This works fine for us: group ct by ct.Contribution.Contributor.UserName.Trim() into g group ct by ct.Contribution.Contributor.UserName.Substring(0, 1) into g
Could you send through some details of where this is not working for you?
Thanks! |
|
|
Actually it was more like var q = from t in work.Query<Part>() group t by new {mark = t.mark.Trim(), t.size} into grp select grp;
|
|