<?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 concatenate data tables pulled from database within a loop? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-concatenate-data-tables-pulled-from-database-within-a/m-p/638873#M83661</link>
    <description>&lt;P&gt;For concatenating data tables use Concatenate() with "Append to first table"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1685979080156.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/53422i6C0DCF227B877A57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1685979080156.png" alt="jthi_0-1685979080156.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Either perform first data query outside the loop and define that as "main" table or use condition inside the loop to define the main table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(i == 1, dt = ..);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To capture those ODBC messages you have few options: check for LogCapture() the query and use if statement to check for eeror messages or check for empty() data table.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2023 15:33:00 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-06-05T15:33:00Z</dc:date>
    <item>
      <title>How to concatenate data tables pulled from database within a loop?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-concatenate-data-tables-pulled-from-database-within-a/m-p/638791#M83654</link>
      <description>&lt;P&gt;The following JSL script snippet pulls test data from database for tested part IDs given in myList using my function opnDtb. This works as expected and the data tables are pulled individually. I would like each new data table pulled to be concatenated (vertically below) to the previous data table. How to implement this in JSL?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( i = 1, i &amp;lt;= N Items (myList), i++,
	dt = opnDtb(myList [i]);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note that all parts listed in myList do not always have test data available (i.e. awaiting test) so I would also need to neglect the cases where JMP throws a warning for no data pulled from database.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'XXXX'&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:11:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-concatenate-data-tables-pulled-from-database-within-a/m-p/638791#M83654</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-09T16:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate data tables pulled from database within a loop?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-concatenate-data-tables-pulled-from-database-within-a/m-p/638873#M83661</link>
      <description>&lt;P&gt;For concatenating data tables use Concatenate() with "Append to first table"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1685979080156.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/53422i6C0DCF227B877A57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1685979080156.png" alt="jthi_0-1685979080156.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Either perform first data query outside the loop and define that as "main" table or use condition inside the loop to define the main table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(i == 1, dt = ..);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To capture those ODBC messages you have few options: check for LogCapture() the query and use if statement to check for eeror messages or check for empty() data table.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 15:33:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-concatenate-data-tables-pulled-from-database-within-a/m-p/638873#M83661</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-06-05T15:33:00Z</dc:date>
    </item>
  </channel>
</rss>

