<?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: how to extract data with criteria of JMP table values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9435#M9282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, you want to submit a SQL query from JMP using values held in a table. The code below uses a brute force approach to build the query string, and may give you some ideas. In this example, the values came from a user interface that required the user to select one and only one name, and one or more products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; reps &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; repsObj &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;GetSelected&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; prod &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; prodObj &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;GetSelected&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;reps&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;!=&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&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;Beep&lt;/SPAN&gt;&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Dialog&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"WARNING: You need to select a name"&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Throw&lt;/SPAN&gt;&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; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;prod&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&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;Beep&lt;/SPAN&gt;&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Dialog&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"WARNING: You need to select at least one product"&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Throw&lt;/SPAN&gt;&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;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Build the resulting query&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; SQLQuery &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"SELECT * FROM Final WHERE salesrep_name = '"&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;reps&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&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;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;prod&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&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; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Simple to build the query&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; SQLQuery &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; SQLQuery&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;"' AND product_group = '"&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;prod&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&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;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// else takes a bit more work&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; prodPart &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"' AND (product_group = '"&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;prod&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&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;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;for&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;i&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;prod&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt; prodPart &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; prodPart&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"' OR product_group = '"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;prod&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;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; prodPart &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; prodPart&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&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;&amp;nbsp; SQLQuery &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; SQLQuery&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;prodPart&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &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: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Show(SQLQuery); // Debug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2014 17:52:57 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2014-09-01T17:52:57Z</dc:date>
    <item>
      <title>how to extract data with criteria of JMP table values</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9434#M9281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;i am trying to extract data for specifc lot list&lt;/P&gt;&lt;P&gt;for now i extract all data and filter the data i need&lt;/P&gt;&lt;P&gt;but&lt;/P&gt;&lt;P&gt;how do i update my data extraction script to take values directly&amp;nbsp; from JMP table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example of data table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New Table( "lot list",&lt;/P&gt;&lt;P&gt; Add Rows( 5 ),&lt;/P&gt;&lt;P&gt; New Column( "lot",&lt;/P&gt;&lt;P&gt;&amp;nbsp; Character,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Nominal,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set Values( {"AB457", "AB589", "XY671", "XY001", "XY187"} )&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example of extract criteria for the lots in the table&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"SELECT * FROM \!"LOTTABLE\!"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE \!"LOT\!" in ('AB457','AB589','XY671','XY001','XY187')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 15:12:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9434#M9281</guid>
      <dc:creator>guy_yosef</dc:creator>
      <dc:date>2014-09-01T15:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract data with criteria of JMP table values</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9435#M9282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, you want to submit a SQL query from JMP using values held in a table. The code below uses a brute force approach to build the query string, and may give you some ideas. In this example, the values came from a user interface that required the user to select one and only one name, and one or more products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; reps &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; repsObj &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;GetSelected&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; prod &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; prodObj &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;GetSelected&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;reps&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;!=&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&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;Beep&lt;/SPAN&gt;&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Dialog&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"WARNING: You need to select a name"&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Throw&lt;/SPAN&gt;&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; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;prod&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&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;Beep&lt;/SPAN&gt;&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Dialog&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"WARNING: You need to select at least one product"&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;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Throw&lt;/SPAN&gt;&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;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Build the resulting query&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; SQLQuery &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"SELECT * FROM Final WHERE salesrep_name = '"&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;reps&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&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;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;prod&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&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; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Simple to build the query&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; SQLQuery &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; SQLQuery&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;"' AND product_group = '"&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;prod&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&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;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// else takes a bit more work&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; prodPart &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"' AND (product_group = '"&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;prod&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&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;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;for&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;i&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;prod&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt; prodPart &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; prodPart&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"' OR product_group = '"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;prod&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;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; prodPart &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; prodPart&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&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;&amp;nbsp; SQLQuery &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; SQLQuery&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;prodPart&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &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: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Show(SQLQuery); // Debug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 17:52:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9435#M9282</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2014-09-01T17:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract data with criteria of JMP table values</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9436#M9283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the fast answer&lt;/P&gt;&lt;P&gt;i manged to create array, now i need to find a way to concat it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = New Table( "lot list",&lt;BR /&gt;Add Rows( 5 ),&lt;BR /&gt;New Column( "lot",&lt;BR /&gt;&amp;nbsp; Character,&lt;BR /&gt;&amp;nbsp; Nominal,&lt;BR /&gt;&amp;nbsp; Set Values( {"AB457", "AB589", "XY671", "XY001", "XY187"} )&lt;BR /&gt;)&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;lots = lot &amp;lt;&amp;lt; Get values;&lt;BR /&gt;//for example&lt;BR /&gt;Show (lots[2]);&lt;BR /&gt;/*:&lt;/P&gt;&lt;P&gt;lots[2] = "AB589";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 07:11:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9436#M9283</guid>
      <dc:creator>guy_yosef</dc:creator>
      <dc:date>2014-09-02T07:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract data with criteria of JMP table values</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9437#M9284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use CONCAT ITEMS to create an IN list from a JMP list.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Table&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"lot list"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Rows&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"lot"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Character&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nominal&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"AB457"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"AB589"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"XY671"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"XY001"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"XY187"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;}&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;lot_list &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; dt&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"lot"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG style="color: navy; font-family: 'Courier New';"&gt;Get values&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;in_list &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"('"&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;Concat Items&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; lot_list&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"', '"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"')"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;sql_string &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"SELECT * FROM mytable m WHERE m.lot_number IN "&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; in_list&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 13:56:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-extract-data-with-criteria-of-JMP-table-values/m-p/9437#M9284</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2014-09-02T13:56:51Z</dc:date>
    </item>
  </channel>
</rss>

