cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

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

Delete all rows except row 1.

I am working on a jsl script and need to delete all rows in a datatable except row 1.

How can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Delete all rows except row 1.

Here is a simple solution.....all messages and functions used are documented in both the Scripting Guide and the Scripting Index

names default to here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.JMP" );

dt << select where( Row() > 1 );
dt << delete rows;
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Delete all rows except row 1.

Here is a simple solution.....all messages and functions used are documented in both the Scripting Guide and the Scripting Index

names default to here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.JMP" );

dt << select where( Row() > 1 );
dt << delete rows;
Jim

Re: Delete all rows except row 1.

How would you do it interactively? Translate those steps into JSL, as Jim did.

Recommended Articles