cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
kiza
Level II

Using Select Where in a script

Hello, I already looked around but couldn't find how to do this.

 

This is what I am trying to do

 

Data Table( "Untitled" ) << select where (contains(:column 1, "5_lbe/?")); 

Basically I have a bunch of data like this: 5_lbe12333, 5_lbe88837 (just to give an example) etc So it would be great if i could do it like in SQL with a SELECT LIKE statement but i cannot seem to find something similar in JMP

 

Any ideas?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
XanGregg
Staff

Re: Using Select Where in a script

You can use Starts With() instead of Contains() for that particular example. For more general matching, you can use JMP regex or pattern match functions.

View solution in original post

4 REPLIES 4
XanGregg
Staff

Re: Using Select Where in a script

You can use Starts With() instead of Contains() for that particular example. For more general matching, you can use JMP regex or pattern match functions.

kiza
Level II

Re: Using Select Where in a script

Got it, thanks =)

mhalwi
Level III

Re: Using Select Where in a script

Hi Guys

need your help to comment on my script below. it is not working properly where im trying to do the data filter for the value with the correct test name only. im using Select Where and Contain/Start with method but only the numeric data is filtered and the filter for test name is not working.

Please help to comment. Your help is greatly appreciated!

f = Current Data Table() << Data Filter(
Location( {300, 196} ),
Mode( Show( 1 ), Include( 1 ) ),
Add Filter(
columns( :NUMERIC_RESULT, :TEST_NAME ),
Where( :NUMERIC_RESULT >= 5000 & :NUMERIC_RESULT <= 13000 ),
Select Where( Contains (:TEST_NAME, "ABC_0019" ),
Display( :NUMERIC_RESULT ),
Display( :TEST_NAME, Size( 204, 38 ), List Display )
),
)
)
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Using Select Where in a script

Contains() would also work here, but unlike SELECT LIKE you cannot use wildcards.

The code

 

Data Table( "Untitled" ) << select where (contains(:column 1, "5_lbe"));
would not only select all rows that start with "5_lbe" but also rows with "5_lbe" at any position within the string. Starts With() is more specific.