Separate Numbers -
07-19-2005
, 07:03 PM
Using FMPro 6.0 on WinXp.
I am trying to separate the below samples of data into three fields. The
sequence of numbers always appear at the beginning of a text field (all)
that contains additional information. The sequence of numbers always has a
"?" afterwards.
I can use a script or calc. field.
GOT
NEED
all
field1 field2 field3
100.600.2? other text of various types 100 600
2
1200.1100.3? other text of various types 1200 1100
3
1200.100.1? other text of various types 1200 100
1
100.1200.12? other text of various types 100 1200
12
Field1 and Field2 calculations appear to work OK. I can't get Field3 to
work properly. Am I approaching this problem correctly?
I have worked with the Field3 calculation so much I probably have it very
hosed up.
Field1 = Left( Left( all,Position(all, ".", 1,1 ) ), Length(Left(
all,Position(all, ".", 1,1 ) -1) ))
Field2 = Middle( all, Length(Left( all,Position(all, ".", 1,1 ) ))+1 ,
Position(all, ".", 1,2 ) - Position(all, ".", 1,1 ) -1)
Field3 = Middle( all, Length(Left( all,Position(all, ".", 1,2 ) ))+1 ,
Position(all, ".", 1,2 ) - Position(all, ".", 1,1 ) -4) |