cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

selecting first 5 numbers of a value and matching them with another column

hi folks,

i want to do a new column, if the first 5 digits in batch_id are the same as the first 5 in batch_id_1 then true else false.

I can do the if statement but not sure how to select the first 5 digits.

jearls11_0-1635699455730.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: selecting first 5 numbers of a value and matching them with another column

You can use Left() to get characters from the start of string

 

Names Default To Here(1);

a = "123456789";
five_char = Left(a, 5);
show(five_char);
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: selecting first 5 numbers of a value and matching them with another column

You can use Left() to get characters from the start of string

 

Names Default To Here(1);

a = "123456789";
five_char = Left(a, 5);
show(five_char);
-Jarmo

Recommended Articles