Subscribe Bookmark RSS Feed

Using Select Where in a script

kiza

Community Trekker

Joined:

May 8, 2012

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
Solution

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.

3 REPLIES
Solution

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

Community Trekker

Joined:

May 8, 2012

Got it, thanks =)

ms

Super User

Joined:

Jun 23, 2011

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.