Counting All Characters in a String

HT3

Member
Hi Guys,

I've got a field (Item.Description) that has a type of CHAR and format of x(80).

We've got a few records exceeding the character length and I would like to identify those records as they're causing issues.

All I've got so far

Code:
FOR EACH Item WHERE
                  Item.Description >

I'm not sure what to put after > ......

Sorry I know it's very simple but not sure where to go with it.

Thanks,
Hassam
 

TomBascom

Curmudgeon
Code:
for each item NO-LOCK TABLE-SCAN where length( item.description ) > 80:
  display recid( item ).  /* or whatever other information will help you know which item record exceeds the length */
end.

You do not want to be locking records when you do this. And, since your plan is to read the entire table (because "description" is not indexed) you can use the TABLE-SCAN option to improve performance by skipping index reads if you are on OpenEdge 11.0+ and the data is in a type 2 storage area (which it should be).
 
Top