Splitting data from txt field
-
- Posts: 2
- Joined: Tue Oct 10, 2017 12:44 pm
Splitting data from txt field
I like to be able to split the data coming in from a comments field from my view and display parts of it as labels e.g. __ - field in the database has following value "This is test data"__ - on my report, i want the data to be displayed in the following format:__ This__ is__ test__ data____The data will be different for every record so an ideal way is to go through the line, pick up the position of first space and print upto that many chars in the first label. Then for the second label, start from the first space position and print upto next occurence of space.____OR if anyone can suggest another way to get same result. Many thanks__
-
- Posts: 3
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Splitting data from txt field
try maybe a calculated field with,__STRREP(DATA,CHR(32),CHR(10))__which should convert spaces in "DATA" into carriage returns.
=> RE: Splitting data from txt field
The WORD function allows you to return a word based on its position in a character string. The default delimiter is a space but you can set it to something different if you want.____So WORD("This is test data",3) for example would return test.____if you want to return the word based on the record number you could use:__WORD(comment,recno())____Kathleen__R&R Support
-
- Posts: 2
- Joined: Tue Oct 10, 2017 12:44 pm
==> RE: Splitting data from txt field
Thank you for your help__I have managed to do it in a slightly different way by using a combination of SUBSTR() and AT() functions.