- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Using Select Where in a script
Got it, thanks =)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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 )
),
)
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.