<?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: concatenate delete duplicates; select where - jmp list in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/concatenate-delete-duplicates-select-where-jmp-list/m-p/4714#M4714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much, this works great... and your first code is really good for understanding jsl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Apr 2012 12:21:41 GMT</pubDate>
    <dc:creator>anneg</dc:creator>
    <dc:date>2012-04-10T12:21:41Z</dc:date>
    <item>
      <title>concatenate delete duplicates; select where - jmp list</title>
      <link>https://community.jmp.com/t5/Discussions/concatenate-delete-duplicates-select-where-jmp-list/m-p/4712#M4712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this problem really puzzles me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make an concatenate but in the one table (dt2) I got also some entries I've got allready in the first one (dt1). I want to keep the ones in the first data Table (dt1) and want to delete them in the second one (dt2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I allready tried and have another problem using the select where and delete the duplicates in the second table before concatenating. I have a List of all the the the duplicates, but I canot use the list as a variable in the select where clause nor the data filter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13340514351792108" jivemacro_uid="_13340514351792108"&gt;&lt;BR /&gt;&lt;P&gt;Summarize( a = by(column(dt, "band")),c=count );&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;The variable looks like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;a = {"2_12_000264_0_9", "2_12_000265_0_1", "2_12_000267_0_3", "2_12_000269_1_3", "2_12_000269_2_1", "2_12_000270_1_7", "2_12_000270_2_5", "2_12_000271_0_1", "2_12_000272_1_9", "2_12_000272_2_7", "2_12_000273_1_1", "2_12_000273_2_8", "2_12_000274_0_4", "2_12_000275_1_3", "2_12_000275_2_1", "2_12_000276_1_4", "2_12_000276_2_2"};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the complete data filter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1334051435039635" jivemacro_uid="_1334051435039635"&gt;&lt;BR /&gt;&lt;P&gt;dt2 &amp;lt;&amp;lt; Data Filter( Add Filter( columns( :Bandname ), Where( :Bandname == {"2_12_000264_0_9", "2_12_000265_0_1", "2_12_000267_0_3", "2_12_000269_1_3", "2_12_000269_2_1", "2_12_000270_1_7", "2_12_000270_2_5", "2_12_000271_0_1", "2_12_000272_1_9", "2_12_000272_2_7", "2_12_000273_1_1", "2_12_000273_2_8", "2_12_000274_0_4", "2_12_000275_1_3", "2_12_000275_2_1", "2_12_000276_1_4", "2_12_000276_2_2"}), Display( :Bandname, Size( 221, 259 ), List Display ), Mode( Show( 1 ) ) ));&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;But using the variable doesnt work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13340514349148908" jivemacro_uid="_13340514349148908"&gt;&lt;BR /&gt;&lt;P&gt;Add Filter( columns( :Bandname ), Where( :Bandname == a ), Display( :Bandname, Size( 221, 259 ), List Display ), Mode( Show( 1 ) ) ));&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;why??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the main problem is the above one, deleting duplicates before concatenating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 09:01:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/concatenate-delete-duplicates-select-where-jmp-list/m-p/4712#M4712</guid>
      <dc:creator>anneg</dc:creator>
      <dc:date>2012-04-10T09:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate delete duplicates; select where - jmp list</title>
      <link>https://community.jmp.com/t5/Discussions/concatenate-delete-duplicates-select-where-jmp-list/m-p/4713#M4713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know why, but in some cases JSL just don't resolve list variables even when a clear-text list is perfectly evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to get around this is to use an expression and substitute a parsed list into it before evaluation. Here's a data filter example:&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #801392;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2800e1;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"$ENGLISH_SAMPLE_DATA/Big Class.jmp"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #801392;"&gt;&lt;SPAN style="color: #000000;"&gt;a &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;"KATIE"&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"HENRY"&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"ROBERT"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;df_expr &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt &lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; data filter&lt;STRONG&gt;(&lt;/STRONG&gt;add filter&lt;STRONG&gt;(&lt;/STRONG&gt; columns&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #160091;"&gt;:&lt;/SPAN&gt;name &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; where&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #160091;"&gt;:&lt;/SPAN&gt;name&lt;SPAN style="color: #160091;"&gt;==&lt;/SPAN&gt;a &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Display&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #160091;"&gt;:&lt;/SPAN&gt;name&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; List Display &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;Substituteinto&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; df_expr&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; a &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Parse&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2800e1;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2800e1;"&gt;Eval&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; a &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;eval&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;df_expr&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #160091;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However, to conditionally select rows based on a list may be scripted more efficiently using For Each Row(). The result of the code below should be identical to the above (except for the Data Filter Window).&lt;/P&gt;&lt;P style="color: #801392;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2800e1;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"$ENGLISH_SAMPLE_DATA/Big Class.jmp"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #801392;"&gt;&lt;SPAN style="color: #000000;"&gt;a &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;"KATIE"&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"HENRY"&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"ROBERT"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;For Each Row&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;Row State&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;Row&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;Selected State&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;Contains&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; a&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;name&lt;STRONG&gt;[]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the duplicate rows are selected, just run&lt;EM&gt; dt &amp;lt;&amp;lt; delete rows&lt;/EM&gt; before concatenating.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 11:23:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/concatenate-delete-duplicates-select-where-jmp-list/m-p/4713#M4713</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2012-04-10T11:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate delete duplicates; select where - jmp list</title>
      <link>https://community.jmp.com/t5/Discussions/concatenate-delete-duplicates-select-where-jmp-list/m-p/4714#M4714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much, this works great... and your first code is really good for understanding jsl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 12:21:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/concatenate-delete-duplicates-select-where-jmp-list/m-p/4714#M4714</guid>
      <dc:creator>anneg</dc:creator>
      <dc:date>2012-04-10T12:21:41Z</dc:date>
    </item>
  </channel>
</rss>

