- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
列内の特定の行を削除する
この投稿のオリジナルは 、English (US) で書かれており、ユーザビリティ向上のため自動翻訳機能を使用して表示しています。コメントを投稿すると、オリジナルの言語(English (US))やご指定の言語 でも表示されます。
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re:列の特定の行を削除します
Names Default To Here( 1 );
dt = Current Data Table();
// Select the rows that meet the qualification
dt << select where( Left( :Order Number, 5 ) == "00097" );
// delete the selected rows. Using the Try() function keeps
// the deletion from failing if no rows were selected
Try( dt << delete rows );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re:列の特定の行を削除します
Names Default To Here( 1 );
dt = Current Data Table();
// Select the rows that meet the qualification
dt << select where( Left( :Order Number, 5 ) == "00097" );
// delete the selected rows. Using the Try() function keeps
// the deletion from failing if no rows were selected
Try( dt << delete rows );
この投稿のオリジナルは 、English (US) で書かれており、ユーザビリティ向上のため自動翻訳機能を使用して表示しています。コメントを投稿すると、オリジナルの言語(English (US))やご指定の言語 でも表示されます。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: delete specefic row in column
Here is one more option using get rows where() in combination with starts with() to get rows into a matrix and then deleting them with delete rows().
Script below will remove all names which start with "J" in Big Class datatable:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
rows_to_delete = dt << Get Rows Where(Starts With(:name, "J"));
If(N Items(rows_to_delete),
dt << Delete Rows(rows_to_delete);
show(rows_to_delete);
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: delete specefic row in column
If you didn't want to use JSL to solve the problem, then a formula column could help.
Similar to @txnelson solution, make a new column, and paste this formula into it.
Left( :Order Number, 5 )
Then in your data table, click on the one row that has 00097 to select it, then use the right click option to Select Matching Rows.
Once they are selected you can either delete those rows, or right click to Exclude/Hide them, so that you preserve all of your original data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: delete specefic row in column
Thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: delete specefic row in column
Thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: delete specefic row in column
Thank you so much