Subscribe Bookmark RSS Feed

JSL Scripting problems with "Select Where"

cmjewart

Community Trekker

Joined:

Sep 6, 2013

I'm working on a JSL script to run repeatedly run analysis.  I'm having issues in that "select where" and "delete rows" do not seem to work in any capacity.  (I'm running JMP 9 (upgrading to 10 shortly))

Do I need to setup SQL on my computer (and other computers) where these JMP scripts will be run before I can use these commands?

1 REPLY
pmroz

Super User

Joined:

Jun 23, 2011

JSL doesn't have SQL built-in.  You have to use it's version of a select where.  Here is an example:

dt = open("$sample_data\Big Class.jmp");

// Reference a column with :

dt << select where (:sex == "F");

// Or, you can reference a column using :name for columns with funny characters

dt << select where (:name("sex") == "F");

dt << delete rows;

Don't save the resulting dataset because you'll overwrite Big Class!

If you're still stuck please post the code you're having trouble with.