Moving text for an export
Moving text for an export
Hello, I have an export (text data file). The customer that uses this file needs a data item (field) moved over to spaces to the left. I can move it to the right with a calculated field like (""+""+""+field )- not sure how to do this for the left.
=> RE: Moving text for an export
Can you simply shorten the previous field?____Kathleen__R&R Support
==> RE: Moving text for an export
That^s how I^m doing other text feilds, the problem with this one is I^m using val()and have to preserve the decimal places (4), so I^m trying to find a way to do this and have it a char field.
===> RE: Moving text for an export
You can use the transform function to convert a number to a string and specify formatting.____So if I have a numeric field called mynumber that contains 123.4567__I can use:__transfrom(mynumber,"99999.9999")__and my output will be a string with 123.4567____Kathleen__R&R Support
-
- Posts: 32
- Joined: Tue Oct 10, 2017 12:44 pm
===> RE: Moving text for an export
If the number field is multiple lengths; 1234.567 and 123.456 then you could do the following;____Pad the front end with as many characters that you may need then add the field to it left trim like; new_field = space(9-len(ltrim(str(<fieldname>,12,2))))+ltrim(str(<fieldname,12,3))____the new_field will always be 9 characters in length.____Tom____