<?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 Re: select where conditions not met in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/select-where-conditions-not-met/m-p/448937#M69572</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table ("Parts")&amp;lt;&amp;lt; select where (:PassOrFail == "Fail");
If( N Rows( Data Table("Parts") &amp;lt;&amp;lt; get selected rows ) &amp;gt; 0,
     Data Table ("Parts")&amp;lt;&amp;lt; subset (Output Table ("Fails", selected rows (1),selected columns(0)));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Jan 2022 18:27:54 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-01-04T18:27:54Z</dc:date>
    <item>
      <title>select where conditions not met</title>
      <link>https://community.jmp.com/t5/Discussions/select-where-conditions-not-met/m-p/448898#M69571</link>
      <description>&lt;P&gt;I have a script running everyday to determine what parts have failed.&amp;nbsp; We had a day where none of the parts failed and since my select where condition was not ("Fail") it grabbed all the passing parts and output them to the next table.&amp;nbsp; How do I write it so that if no parts fail, the next tables should be blank?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table ("Parts")&amp;lt;&amp;lt; select where (:PassOrFail == "Fail");
Data Table ("Parts")&amp;lt;&amp;lt; subset (Output Table ("Fails", selected rows (1),selected columns(0)));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since there were no "Fail" in my PassOrFail Column, the output table "Fails" was just a replica of the original table "Parts"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:42:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-where-conditions-not-met/m-p/448898#M69571</guid>
      <dc:creator>LasersAreCool</dc:creator>
      <dc:date>2023-06-10T23:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: select where conditions not met</title>
      <link>https://community.jmp.com/t5/Discussions/select-where-conditions-not-met/m-p/448937#M69572</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table ("Parts")&amp;lt;&amp;lt; select where (:PassOrFail == "Fail");
If( N Rows( Data Table("Parts") &amp;lt;&amp;lt; get selected rows ) &amp;gt; 0,
     Data Table ("Parts")&amp;lt;&amp;lt; subset (Output Table ("Fails", selected rows (1),selected columns(0)));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Jan 2022 18:27:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-where-conditions-not-met/m-p/448937#M69572</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-01-04T18:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: select where conditions not met</title>
      <link>https://community.jmp.com/t5/Discussions/select-where-conditions-not-met/m-p/448960#M69574</link>
      <description>&lt;P&gt;Use &lt;STRONG&gt;get rows where&lt;/STRONG&gt; instead of &lt;STRONG&gt;select where&lt;/STRONG&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fail_rows = Data Table( "Parts" ) &amp;lt;&amp;lt; get rows where( :PassOrFail == "Fail" );

if (nrows(fail_rows) &amp;gt; 0,
	Data Table( "Parts" ) &amp;lt;&amp;lt; subset(rows(fail_rows), selected columns( 0 ),
		Output Table( "Fails")
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Jan 2022 19:22:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-where-conditions-not-met/m-p/448960#M69574</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-01-04T19:22:05Z</dc:date>
    </item>
  </channel>
</rss>

