<?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 query an external data base to the existing data table in JMP in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-query-an-external-data-base-to-the-existing-data-table-in/m-p/202218#M41744</link>
    <description>&lt;P&gt;The &lt;A href="https://www.jmp.com/support/help/14-2/query-builder.shtml#" target="_self"&gt;SQL Query Builder&lt;/A&gt;&amp;nbsp;in JMP will do this for you automatically. No need to write the JSL yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a part of the query you can &lt;A href="https://www.jmp.com/support/help/14-2/build-the-sql-query.shtml#613412" target="_self"&gt;build a filter&lt;/A&gt;. That filter can &lt;A href="https://www.jmp.com/support/help/14-2/build-the-sql-query.shtml#623512" target="_self"&gt;import data by matching values from an existing data table&lt;/A&gt;, exactly as you're trying to do here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After building the query you can &lt;A href="https://www.jmp.com/support/help/14-2/query-builder-red-triangle-options.shtml" target="_self"&gt;save the the Run Script&lt;/A&gt; to get the JSL to run the query as a part of a larger script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 May 2019 20:50:53 GMT</pubDate>
    <dc:creator>Jeff_Perkinson</dc:creator>
    <dc:date>2019-05-07T20:50:53Z</dc:date>
    <item>
      <title>how to query an external data base to the existing data table in JMP</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-query-an-external-data-base-to-the-existing-data-table-in/m-p/201750#M41726</link>
      <description>&lt;P&gt;This is the code that currently works , but i would like to automate it and probably hard code the section in BOLD Italics below - which is the list of CMOS_Lot-Wafer from the&amp;nbsp; "Wafer List" datatable, I have also attachged the code that i tried to hard code this section and does not work. Could someone take a look at it and help me out please, Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Wafer list is the user list that the user will provide)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = Data Table( "Wafer List" ) &amp;lt;&amp;lt; Stack(
	columns( :Name( "Group A - Wafer Number" ), :Name( "Group B - Wafer Number" ) ),
	Source Label Column( "Label" ),
	Stacked Data Column( "CMOS-Lot-Wafer" ),
	Output Table( "Stacked-waferList" )
);

dt3 = Open Database(
	"DSN=MS_SQL;Description=WAFERVIEWER;Trusted_Connection=Yes;APP=JMP;WSID=USSJC-J9K98H2;DATABASE=PRODUCT;",
	"SELECT T.[CHECK AXSELFTEST], T.[CMOS_Lot-WaferID] FROM Summary S
INNER JOIN WS_Tests T ON T.[CMOS_Lot-WaferID] = S.[CMOS_Lot-WaferID] AND T.RetestID = S.RetestID
&lt;EM&gt;&lt;STRONG&gt;WHERE S.[CMOS_Lot-Wafer] IN ('DBM301-02',&lt;/STRONG&gt;
&lt;STRONG&gt;'DBM308-12',
'DBM306-24',
'DBM297-03',
'DBM308-20',
'DBM297-02',
'DBM316-03',
'DBM306-09',
'DBM024-09'&lt;/STRONG&gt;
&lt;STRONG&gt;)",
	"Summary"&lt;/STRONG&gt;&lt;/EM&gt;
);

dt2 = Data Table( "Stacked waferList" ) &amp;lt;&amp;lt; Join(
	With( Data Table( "Summary" ) ),
	Select( :Label, :Name( "CMOS-Lot-Wafer" ), :Name( "CMOS_Lot-WaferID" ) ),
	SelectWith( :DieID, :CHECK AXSELFTEST ),
	By Matching Columns( :Name( "CMOS_Lot-WaferID" ) = :Name( "CMOS_Lot-WaferID" ) ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 0 ),
	Preserve main table order( 1 ), 
	Output Table( "WS- Summary for WaferList" )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Code does NOT work -&amp;nbsp; I tried to hard code the CMOS_Lot-Wafer part but does not work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Wafer list is the user list that the user will provide)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = Data Table( "Wafer List" ) &amp;lt;&amp;lt; Stack(
	columns( :Name( "Group A - Wafer Number" ), :Name( "Group B - Wafer Number" ) ),
	Source Label Column( "Label" ),
	Stacked Data Column( "CMOS-Lot-Wafer" ),
	Output Table( "Stacked-waferList" )
);

SQLConnection = Create Database Connection(
	"DSN=MS_SQL;Description=WAFERVIEWER;Trusted_Connection=Yes;APP=JMP;WSID=USSJC-J9K98H2;DATABASE=ISTANBUL;"
);
PrePUSQL01 =
"SELECT
T.CHECK AXSELFTEST,
C.CMOS_Lot-Wafer
FROM database.dbo.WS_tests AS T
JOIN Stacked waferList AS C ON C.CMOS_Lot-Wafer = T.CMOS_Lot-Wafer";

dt = Execute SQL( SQLConnection, PrePUSQL01, "dt" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 May 2019 12:05:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-query-an-external-data-base-to-the-existing-data-table-in/m-p/201750#M41726</guid>
      <dc:creator>varshini</dc:creator>
      <dc:date>2019-05-07T12:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to query an external data base to the existing data table in JMP</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-query-an-external-data-base-to-the-existing-data-table-in/m-p/202065#M41731</link>
      <description>&lt;P&gt;This doesn't look like valid SQL code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;"SELECT
T.CHECK AXSELFTEST,
C.CMOS_Lot-Wafer
FROM database.dbo.WS_tests AS T
JOIN Stacked waferList AS C ON C.CMOS_Lot-Wafer = T.CMOS_Lot-Wafer";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It appears that you are trying to combine SQL with JSL, which is not possible.&amp;nbsp; Does the SQL statement run in a database interface package like TOAD, PL/SQL Developer, SQL Navigator etc.?&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 12:33:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-query-an-external-data-base-to-the-existing-data-table-in/m-p/202065#M41731</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2019-05-07T12:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to query an external data base to the existing data table in JMP</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-query-an-external-data-base-to-the-existing-data-table-in/m-p/202218#M41744</link>
      <description>&lt;P&gt;The &lt;A href="https://www.jmp.com/support/help/14-2/query-builder.shtml#" target="_self"&gt;SQL Query Builder&lt;/A&gt;&amp;nbsp;in JMP will do this for you automatically. No need to write the JSL yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a part of the query you can &lt;A href="https://www.jmp.com/support/help/14-2/build-the-sql-query.shtml#613412" target="_self"&gt;build a filter&lt;/A&gt;. That filter can &lt;A href="https://www.jmp.com/support/help/14-2/build-the-sql-query.shtml#623512" target="_self"&gt;import data by matching values from an existing data table&lt;/A&gt;, exactly as you're trying to do here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After building the query you can &lt;A href="https://www.jmp.com/support/help/14-2/query-builder-red-triangle-options.shtml" target="_self"&gt;save the the Run Script&lt;/A&gt; to get the JSL to run the query as a part of a larger script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 20:50:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-query-an-external-data-base-to-the-existing-data-table-in/m-p/202218#M41744</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2019-05-07T20:50:53Z</dc:date>
    </item>
  </channel>
</rss>

