cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
cchueng
Level IV

Parse string of a column and fill another column

Hi, 

I have a table containing ProductName and I want to generate the OUTPUT column.  The OUTPUT column a concatenation of ProductID with Serial#. How do I accurately parse the Serial# and create the OUTPUT column?

Serial # examples:

  • 07-08_13 means Serial# 07, 08, 13
  • 09-12 means Serial# 09, 10, 11, 12
  • 01-03_05-08 means Serial# 01, 02, 03, 05, 06, 07, 08
  • 01_04_05-08 means Serial# 01, 04, 05, 06, 07, 08
  • 09_11_13_14 means Serial# 09,11,13,14

 

cchueng_5-1633542341785.png

 

ProductNameOUTPUT
AABBCC_07-08_13AABBCC-07
AABBCC_07-08_13AABBCC-08
AABBCC_07-08_13AABBCC-13
AABBCC_09-12AABBCC-09
AABBCC_09-12AABBCC-10
AABBCC_09-12AABBCC-11
AABBCC_09-12AABBCC-12
EEFFGG_02EEFFGG-02
HHIIJJ_01-07HHIIJJ-01
HHIIJJ_01-07HHIIJJ-02
HHIIJJ_01-07HHIIJJ-03
HHIIJJ_01-07HHIIJJ-04
HHIIJJ_01-07HHIIJJ-05
HHIIJJ_01-07HHIIJJ-06
HHIIJJ_01-07HHIIJJ-07
KKLLLMM_01-03_05-08KKLLLMM-01
KKLLLMM_01-03_05-08KKLLLMM-02
KKLLLMM_01-03_05-08KKLLLMM-03
KKLLLMM_01-03_05-08KKLLLMM-05
KKLLLMM_01-03_05-08KKLLLMM-06
KKLLLMM_01-03_05-08KKLLLMM-07
KKLLLMM_01-03_05-08KKLLLMM-08
NNOOPP_01_04_05-08NNOOPP-01
NNOOPP_01_04_05-08NNOOPP-04
NNOOPP_01_04_05-08NNOOPP-05
NNOOPP_01_04_05-08NNOOPP-06
NNOOPP_01_04_05-08NNOOPP-07
NNOOPP_01_04_05-08NNOOPP-08
QQRRSS_09_11_13_14QQRRSS_09
QQRRSS_09_11_13_14QQRRSS_11
QQRRSS_09_11_13_14QQRRSS_13
QQRRSS_09_11_13_14QQRRSS_14

 

 

 

 

 

 

20 REPLIES 20
txnelson
Super User

Re: Parse string of a column and fill another column

Yes you can, but you will have to work the logic out as to when to add new rows, etc.  What I suggest, is that what you do, is run the code as is, and then use

     Tables=>Join

to put the 2 data tables together.

Jim

Recommended Articles