<?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 move one row from one table to another table? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-move-one-row-from-one-table-to-another-table/m-p/46959#M26761</link>
    <description>Thank you, Jim. With your help, i realized it.</description>
    <pubDate>Thu, 09 Nov 2017 09:04:23 GMT</pubDate>
    <dc:creator>GoodMan</dc:creator>
    <dc:date>2017-11-09T09:04:23Z</dc:date>
    <item>
      <title>how to move one row from one table to another table?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-move-one-row-from-one-table-to-another-table/m-p/46887#M26714</link>
      <description>&lt;P&gt;Hi, Here i ran into a problem. I have two tables. One is main table which have 847 rows record. It recorded every one min. Now i hope i can click&amp;nbsp;JSL once so that every one min there is one row was automaitically moved from main table to Table 2. That means after 60 mins, there are 60 rows in Table2. 120mins later, there are 120rows in Tables2. Until to the end after 847 mins.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced.&lt;/P&gt;&lt;P&gt;GMan&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 11:23:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-move-one-row-from-one-table-to-another-table/m-p/46887#M26714</guid>
      <dc:creator>GoodMan</dc:creator>
      <dc:date>2017-11-08T11:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to move one row from one table to another table?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-move-one-row-from-one-table-to-another-table/m-p/46907#M26727</link>
      <description>&lt;P&gt;Here is a simplified example of how to do your minute by minute updating.&amp;nbsp; If you do a little playing with it, you should get what you need&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// Reduce the number of rows to a reasonable number for the test
dt &amp;lt;&amp;lt; select rows( {1, 2, 3} );
dt &amp;lt;&amp;lt; invert row selection;
dt &amp;lt;&amp;lt; delete rows;

// Create the output table
dt2 = New Table( "update",
	New Column( "time updated", Format( "d/m/y h:m:s", 17 ) ),
	New Column( "Name", character )
);
Wait( 0 );

// Set the initial values
begin = Today();
TheRow = -1; // set to -1 so first row will be immediatly written

// Loop until the minute has changed, then update 
While( TheRow + 2 &amp;lt;= N Rows( dt ),
	If( Date Difference( begin, Today(), "Minute", "actual" ) &amp;gt; TheRow,
		dt2 &amp;lt;&amp;lt; Begin Data Update;
		dt2 &amp;lt;&amp;lt; Add Rows( 1 );
		dt2:time updated[N Rows( dt2 )] = Today();
		dt2:Name[N Rows( dt2 )] = dt:Name[TheRow + 2];
		dt2 &amp;lt;&amp;lt; End Data Update;
		Wait(55);
		TheRow++;
	);
	// This is optional, but it should reduce the cpu cycle impact if used
	Wait(1);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Nov 2017 16:46:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-move-one-row-from-one-table-to-another-table/m-p/46907#M26727</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-11-08T16:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to move one row from one table to another table?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-move-one-row-from-one-table-to-another-table/m-p/46959#M26761</link>
      <description>Thank you, Jim. With your help, i realized it.</description>
      <pubDate>Thu, 09 Nov 2017 09:04:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-move-one-row-from-one-table-to-another-table/m-p/46959#M26761</guid>
      <dc:creator>GoodMan</dc:creator>
      <dc:date>2017-11-09T09:04:23Z</dc:date>
    </item>
  </channel>
</rss>

