eo
MIS
- Apr 3, 2003
- 809
Hi
CR10, SQL
I have a field, for example 6/125/100/142500/LT
Each section between the '/'s needs to be trimmed out as a field on its own.
The only way I know how to do this is via a 3 step process for EACH section...
1) Create a marker in the string: @Marker
2) Trim the section out: @Trim
3) Create a new string for the next step: @String
The new string is now 125/100/142500/LT, and the whole process must be repeated to romove the next section, and so on.
Surely ther must be an easier way?
EO
Hertfordshire, England
CR10, SQL
I have a field, for example 6/125/100/142500/LT
Each section between the '/'s needs to be trimmed out as a field on its own.
The only way I know how to do this is via a 3 step process for EACH section...
1) Create a marker in the string: @Marker
Code:
if instr ({field], '/') >0
then instr ({field], '/') -1
Code:
Left ({field}, @Marker)
Code:
Mid (field}, @Marker)
The new string is now 125/100/142500/LT, and the whole process must be repeated to romove the next section, and so on.
Surely ther must be an easier way?
EO
Hertfordshire, England