<?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 save a jmp data table after its downloaded from sql query in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-save-a-jmp-data-table-after-its-downloaded-from-sql-query/m-p/751503#M93258</link>
    <description>&lt;P&gt;If you don't mind JMP to wait for the query to finish you can use &amp;lt;&amp;lt; Run Foreground instead of &amp;lt;&amp;lt;run (you should in my opinion always use either &amp;lt;&amp;lt; Run Background or &amp;lt;&amp;lt; Run Foreground instead of &amp;lt;&amp;lt;Run) and then save the data table when JMP continues the script execution. Other option is to use &amp;lt;&amp;lt; On Run Complete (scripting index has simple example), and save the table with that(&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/sql-messages.shtml#" target="_blank"&gt;SQL Messages (jmp.com)&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2024 07:14:31 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-05-02T07:14:31Z</dc:date>
    <item>
      <title>How to save a jmp data table after its downloaded from sql query</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-jmp-data-table-after-its-downloaded-from-sql-query/m-p/751363#M93255</link>
      <description>&lt;P&gt;I am importing data from data base and would like to save the data table. The data table takes some time to get downloaded. I would like to detect when the datable is downloaded and then save it at a location. Below is the code i tried.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first part of extracting data table is happening fine.&lt;/P&gt;&lt;P&gt;The second part (highlighted in blue ) of detecting the data table once its downloaded and open is not working. I a, using&amp;nbsp;&lt;/P&gt;&lt;P&gt;"get data table list" and printing that value once data table is downloaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Extracting data table from data base //
ex1 = New Window( "TRIAL_1", &amp;lt;&amp;lt; modal,
panel Box( "NAME",&amp;nbsp;
H List Box(&amp;nbsp;
Text Box( "batchid:" ),&amp;nbsp;
teb0 = Number Edit Box()
);
&amp;nbsp;
),
panel box("SELECT",

h list box(
ok_button = button box("OK",&amp;nbsp;
(
a = teb0 &amp;lt;&amp;lt; get;
obj = New SQL Query(
Connection( "ODBC:DSN=SLT Data Server" ),
QueryName( "t_wlan_mfg_data" ),
CustomSQL(
Eval Insert("SELECT *
FROM t_wlan_mfg_data&amp;nbsp; t1&amp;nbsp; where( t1.batchid = ^a^ );")
)
) &amp;lt;&amp;lt; Run;

)
),

),

);
);

&lt;FONT color="#0000FF"&gt;// Waiting for data table to save //

i=1;
while (
i,

(l = get data table list();
show(l);


if (
Nitems(l)&amp;gt;0;
show(l);
break();
);

"no";
);

i++,

);


&lt;/FONT&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 May 2024 06:23:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-jmp-data-table-after-its-downloaded-from-sql-query/m-p/751363#M93255</guid>
      <dc:creator>vharibal</dc:creator>
      <dc:date>2024-05-02T06:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a jmp data table after its downloaded from sql query</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-jmp-data-table-after-its-downloaded-from-sql-query/m-p/751503#M93258</link>
      <description>&lt;P&gt;If you don't mind JMP to wait for the query to finish you can use &amp;lt;&amp;lt; Run Foreground instead of &amp;lt;&amp;lt;run (you should in my opinion always use either &amp;lt;&amp;lt; Run Background or &amp;lt;&amp;lt; Run Foreground instead of &amp;lt;&amp;lt;Run) and then save the data table when JMP continues the script execution. Other option is to use &amp;lt;&amp;lt; On Run Complete (scripting index has simple example), and save the table with that(&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/sql-messages.shtml#" target="_blank"&gt;SQL Messages (jmp.com)&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 07:14:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-jmp-data-table-after-its-downloaded-from-sql-query/m-p/751503#M93258</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-05-02T07:14:31Z</dc:date>
    </item>
  </channel>
</rss>

