New Posts New Posts RSS Feed: trim or left on char fields
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

trim or left on char fields

 Post Reply Post Reply
Author
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: trim or left on char fields
    Posted: 18-May-2011 at 5:46pm
Hi Kurt,
 
Canonical functions like Trim and LTrim are supported today when using Entity SQL in DevForce.  The PassthruEsqlQuery is used for ESQL queries in DevForce.   You can find more information here - http://drc.ideablade.com/xwiki/bin/view/Documentation/passthruesql-query
 
The "AfterGet" property interceptor might be a better alternative for the char fields.  With an AfterGet interceptor you can modify the value before it's returned from a property getter, so you could use this to strip off spaces.  It's true that the queried data would still have spaces when returned from the EntityServer, but since results are compressed before sending to the client the extra spaces probably don't cause a significant increase in payload size.  If you want more information on property interceptors this is a good place to start - http://drc.ideablade.com/xwiki/bin/view/Documentation/attribute-interception
 
 
Back to Top
kpinniger View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Mar-2010
Location: Atlanta, GA USA
Posts: 7
Post Options Post Options   Quote kpinniger Quote  Post ReplyReply Direct Link To This Post Posted: 18-May-2011 at 6:20am
Any idea on when we might support EF 4 ability to do a left or trim on char columns...
 
We have values in our legacy customer databases like this for a value,
 
“AP                    ”
 
and it is a char(60).  We cannot change customers data and we cannot change customers column types, so we would like to be able to use EF 4 trim or ltrim.  So when we retrieve data we need to be able to trim off the padded spaces.
 
Thanks,
Kurt Pinniger
CDC Software
 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down