The LTRIM(TEMP1) would do something similar to this if the field length of the calculated field was too low. Although I'd have expected to see the I on the 2nd example. The only explanation I can think of for the RTrim() example is that at some stage in the calculation, the field has been converted to a numeric with no decimal places. Are you also using the VAL() function, or are you just using LTrim() and RTrim()? I guess a sample file may be needed here. You may just have time to get one to US tech support.!! Or email one to me if you like, but it's 7pm on a Friday evening here, and I'm off to the pub!!
[size="1"][ July 18, 2003, 02:44 PM: Message edited by: Steve Caiels ][/size]
This is really dumb thought from me but, it is Friday and that a day when I often forget to check simple things so, here goes.
If I perform an Ltrim or Rtrim on a cut and paste version of your sample I get a new field of only 10 chars width default (using 5.02) which exhibits similar output to yours (but not identical). Have you tried changing the data and display widths for your resulting field(s)? I assume you are Ltrimming and the Rtrimming the result of that?)
Silly thought but one to eliminate from the possibilities I suspect. Just in case Friday has got to you!
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:
80.00 I CHKG
540001.59 52 MED[/font][/quote]I'm trying to use the LTrim and RTrim functions to return something just like this:
80.00 I CHKG
540001.59 52 MED[/font][/quote]I 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:
540001.49 52[/font][/quote]It 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:
540001[/font][/quote]The 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. /b[/quote]
[size="1"][ July 18, 2003, 02:50 PM: Message edited by: Grant Perkins ][/size]