Character Count in a field

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
chibbert
Posts: 9
Joined: Tue Oct 10, 2017 12:44 pm

Character Count in a field

Post by chibbert » Fri Jul 10, 2009 10:37 am

I have a ITEM DESCRIPTION character field that is 30 characters in length. If the description is "GUMMI BEARS", I would like to be able to count that there is 11 characters there. Basically - I have 9,000 items and I need to build a list of items where the description exceeds 25 characters in length. Is this possible?

Tom_Freitas_(Guest)
Posts: 32
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Character Count in a field

Post by Tom_Freitas_(Guest) » Fri Jul 10, 2009 12:15 pm

I am assuming that this is a database and that the name comes from a field and that this field is left justified! If the field name is description and you want to see all descriptions that are over 11 characters in length, then filter the report as follows;____len(rtrim(description)) > 11____You rtrim or right trim so that the spaces are not counted as part of the description. That way it will look at the len or length of the description up to the last character only.

chibbert
Posts: 9
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Character Count in a field

Post by chibbert » Fri Jul 10, 2009 12:52 pm

Your method worked great - thanks so much for your quick response.

Post Reply