Gillian
July 18th, 2003, 02:04 PM
I'm having a very odd problem with the RTrim and LTrim functions. I've got a text file exported (using Redwing) from PDF, and I need to trim the trailing and leading spaces from a field I have. The field looks a bit like this:
100.00 43 VISION
80.00 I CHKG
540001.59 52 MEDI'm trying to use the LTrim and RTrim functions to return something just like this:
100.00 43 VISION
80.00 I CHKG
540001.59 52 MEDI can't show it well here, but the text IS spaced such that trimming the left spaces will return such uniform formatting. However, when I try to use LTrim (syntax: LTrim(Temp1) where Temp1 is the name of the field), it gives me text that looks like this:
100.00 43
80.00
540001.49 52It doesn't show the third section of the line, and doesn't always show the middle section of the line, with no apparent pattern.
When I use RTrim:
100
80
540001The pattern seems to be that it's trimming everything from the right up to the decimal point in the number!
Am I missing something simple here? I have considered that what look like spaces may actually be characters of some kind, but I'm not sure how I could find out what they are, or even how to get rid of them.
I hope this has made sense. I'll try to clarify anything that isn't clear.
100.00 43 VISION
80.00 I CHKG
540001.59 52 MEDI'm trying to use the LTrim and RTrim functions to return something just like this:
100.00 43 VISION
80.00 I CHKG
540001.59 52 MEDI can't show it well here, but the text IS spaced such that trimming the left spaces will return such uniform formatting. However, when I try to use LTrim (syntax: LTrim(Temp1) where Temp1 is the name of the field), it gives me text that looks like this:
100.00 43
80.00
540001.49 52It doesn't show the third section of the line, and doesn't always show the middle section of the line, with no apparent pattern.
When I use RTrim:
100
80
540001The pattern seems to be that it's trimming everything from the right up to the decimal point in the number!
Am I missing something simple here? I have considered that what look like spaces may actually be characters of some kind, but I'm not sure how I could find out what they are, or even how to get rid of them.
I hope this has made sense. I'll try to clarify anything that isn't clear.