<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic select where on  multiple columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233125#M46227</link>
    <description>&lt;P&gt;I have a data table with 60 columns and I'm trying to select columns which have "Test" in their name.I then need to select all 1.values that lie in the range 50 &amp;amp; -50 in Test_AB;&lt;/P&gt;&lt;P&gt;2.values that lie in the range 100 &amp;amp; -100 in Test_CD;&lt;/P&gt;&lt;P&gt;3.values that lie in the range 200 &amp;amp; -200 in Test_EF;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and delete other rows.&lt;/P&gt;&lt;P&gt;Is there an easy way to do this in JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 03:21:11 GMT</pubDate>
    <dc:creator>ENTHU</dc:creator>
    <dc:date>2019-11-11T03:21:11Z</dc:date>
    <item>
      <title>select where on  multiple columns</title>
      <link>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233125#M46227</link>
      <description>&lt;P&gt;I have a data table with 60 columns and I'm trying to select columns which have "Test" in their name.I then need to select all 1.values that lie in the range 50 &amp;amp; -50 in Test_AB;&lt;/P&gt;&lt;P&gt;2.values that lie in the range 100 &amp;amp; -100 in Test_CD;&lt;/P&gt;&lt;P&gt;3.values that lie in the range 200 &amp;amp; -200 in Test_EF;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and delete other rows.&lt;/P&gt;&lt;P&gt;Is there an easy way to do this in JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 03:21:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233125#M46227</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2019-11-11T03:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: select where on  multiple columns</title>
      <link>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233137#M46228</link>
      <description>&lt;P&gt;Below is an example of how to do the items you request&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

// Find all columns that have PN in their name, and select the column
For( i = 1, i &amp;lt;= N Cols( dt ), i++,
	If( Contains( Column( dt, i ) &amp;lt;&amp;lt; get name, "PN" ),
		Column( dt, i ) &amp;lt;&amp;lt; set selected
	)
);

// Select the required rows
dt &amp;lt;&amp;lt; select where(
	118 &amp;lt;= :NPN1 &amp;lt;= 122 | 
	360 &amp;lt;= :PNP1 &amp;lt;= 300 | 
	500 &amp;lt;= :PNP2 &amp;lt;= 510
);

// Delete the non selected rows
dt &amp;lt;&amp;lt; invert row selection;
dt &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;These 2 tasks are very elementry items in JSL.&amp;nbsp; With the number of interactions you have had on the Discussion Forum, I would have expected you to have been able to handle your issue without help from the Discussion Group.&amp;nbsp; If you are still having issues with writing your own JSL, then I strongly suggest that you sign up for a training class&amp;nbsp; on JSL, and even more strongly suggest you take the time to read the Scripting Guide.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 05:40:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233137#M46228</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-11-11T05:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: select where on  multiple columns</title>
      <link>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233138#M46229</link>
      <description>Thanks for the response.&lt;BR /&gt;Well, with my knowledge through all the interactions in this forum I already had written this piece of code before posting.The intent behind asking this question was to see if there is an "easy" way to do this.By that I mean lesser number of lines.Also if there is a way to avoid loops.I have multiple loops in the script and that slows down the execution.</description>
      <pubDate>Mon, 11 Nov 2019 06:09:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233138#M46229</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2019-11-11T06:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: select where on  multiple columns</title>
      <link>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233139#M46230</link>
      <description>&lt;P&gt;If you already had working code it might be very useful to include it in your request.&amp;nbsp; Many times a modification of your working code will the best thing to achieve your results.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 06:26:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-where-on-multiple-columns/m-p/233139#M46230</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-11-11T06:26:25Z</dc:date>
    </item>
  </channel>
</rss>

