<?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() not working in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-Where-not-working/m-p/6226#M6225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I spent a lot of time trying to create a simple "Select Where()" statement in JMP, and it was not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the line of code I was trying to use: &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;dtData &amp;lt;&amp;lt; select where(yParamList&lt;I&gt; &amp;lt;= minLimList&lt;I&gt;);&lt;/I&gt;&lt;/I&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;yParamList&lt;I&gt; is a valid column&lt;/I&gt;&lt;/P&gt;&lt;P&gt;minLimList is a valid number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reading some of these forums, I found someone suggesting to put it all in a string and then parse it out, so i changed the above code to this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;select_string = "dt &amp;lt;&amp;lt; select where(" || ":" || yParamNames&lt;I&gt; || " &amp;lt; " || char(minLimList&lt;I&gt;) || ");";&lt;/I&gt;&lt;/I&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;eval(parse(select_string));&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;yParamNames&lt;I&gt; is just a name version of the yParamList&lt;I&gt; from the original code.&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, why doesn't my original code work?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the link where it was suggested to use the string, and eval(parse(string));&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="111062" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://community.jmp.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2013 00:20:13 GMT</pubDate>
    <dc:creator>mikedriscoll</dc:creator>
    <dc:date>2013-02-01T00:20:13Z</dc:date>
    <item>
      <title>Select Where() not working</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-not-working/m-p/6226#M6225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I spent a lot of time trying to create a simple "Select Where()" statement in JMP, and it was not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the line of code I was trying to use: &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;dtData &amp;lt;&amp;lt; select where(yParamList&lt;I&gt; &amp;lt;= minLimList&lt;I&gt;);&lt;/I&gt;&lt;/I&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;yParamList&lt;I&gt; is a valid column&lt;/I&gt;&lt;/P&gt;&lt;P&gt;minLimList is a valid number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reading some of these forums, I found someone suggesting to put it all in a string and then parse it out, so i changed the above code to this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;select_string = "dt &amp;lt;&amp;lt; select where(" || ":" || yParamNames&lt;I&gt; || " &amp;lt; " || char(minLimList&lt;I&gt;) || ");";&lt;/I&gt;&lt;/I&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;eval(parse(select_string));&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;yParamNames&lt;I&gt; is just a name version of the yParamList&lt;I&gt; from the original code.&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, why doesn't my original code work?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the link where it was suggested to use the string, and eval(parse(string));&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="111062" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://community.jmp.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 00:20:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-not-working/m-p/6226#M6225</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2013-02-01T00:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where() not working</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-not-working/m-p/6227#M6226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to enclose yParamList&lt;I&gt; within As Column().&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works in JMP 10:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dtData &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"$SAMPLE_DATA/Big Class.jmp"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;yParamList&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;dtData&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;get column names&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;minLimList&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;14&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;i&lt;/SPAN&gt;=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;dtData &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; select where&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;as column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;yParamList&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;])&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt; minLimList&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 00:34:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-not-working/m-p/6227#M6226</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-02-01T00:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where() not working</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-not-working/m-p/6228#M6227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. That was driving me crazy.&amp;nbsp; I looked at the As Column() function but didn't bother because I can't believe JMP isn't smart enough to know it is column.&amp;nbsp; At one point I had a column(dtData, yParamList&lt;I&gt;) statement in there as well.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is, after I plugged your code in there, it took about 15 seconds for the script to run through my loop of about 420 columns x 4000 rows. I thought that was strange because it had just run in about 2 seconds with the string / parse method that I had used as a work around. Seems like the string / parse method is actually much more efficient... go figure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 00:43:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-not-working/m-p/6228#M6227</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2013-02-01T00:43:56Z</dc:date>
    </item>
  </channel>
</rss>

