09-22-2011 09:33 AM
I have 4 variables that I am trying to combine into one but each thing I try is not giving me the result I want. Here are my entries 20,1,6312468,1 and I want to combine them to get 2016312468 but every time I try something I get 20 space 1 space 6312468 space 1. I have tried cat, catt, catx and trim each one then use !! to combine and each time it returns the spaces. Any thoughts?
09-22-2011 12:36 PM
data_null_; is providing the correct answer, because CATS() performs the STRIP() and the concatenation
want = cats( of w x y z );
(not even those commas needed when the list is preceeded with OF )
09-22-2011 02:01 PM
Peter, Of course data_null_ is correct .. as he virtually always is! However, the other responses were also correct. For the fun of it I ran a one trial test on 1 million identical records. I stopped at one test as I happened to like the results: my proposed method came in first (cpu: 1.01 seconds), data_null_'s second (cpu: 1.04 seconds), and your suggestion third (cpu: 1.14 seconds). Of course, on repeated tests, I would guess that any of the methods could come in at any position. Your and datanull's methods are definitely easier to type and I'd gladly award both of you correct answers if I could, but it wasn't my post.
Need further help from the community? Please ask a new question.