Counting Characters
Counting Characters
Does anyone know how to create or derive how many characters are in a field? We have a procedure where we add an "S/A" to the beginning of name field, the field has a total of 38 characters. I have a calculated field where it checks for an "S/A" using LEFT(VS_BUS_NM,3), I want to be able to take away the "S/A" and leave the name only... I^ve tried the RIGHT(VS_BUS_NM,35) option but does not work since the name lengths vary, does anyone have an idea on how I can get this working? If I could know the number of characters that the field has, I would be able to incorporate the RIGHT command with better results... I am currently using SQL Edition V8.1
-
- Posts: 32
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Counting Characters
I^m sure the SQL has some of the same features of xbase. A simple command would be len(rtrim(field_name)) len is for length, rtrim is for rtrim.____
-
- Posts: 51
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Counting Characters
Thanks__your suggestion worked great for what I needed...
==> RE: Counting Characters
I don^t know if this function is available in the SQL version but:____substr( mystring, 4)____will extract everything starting in position 4 of the string.____Randal Ferguson