<?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: Concat row values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Similar-keys/m-p/770120#M95108</link>
    <description>&lt;P&gt;Thanks a lot Jarmo!&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2024 17:49:03 GMT</pubDate>
    <dc:creator>Jackie_</dc:creator>
    <dc:date>2024-07-03T17:49:03Z</dc:date>
    <item>
      <title>Similar keys</title>
      <link>https://community.jmp.com/t5/Discussions/Similar-keys/m-p/770105#M95104</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 18:07:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Similar-keys/m-p/770105#M95104</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2024-07-11T18:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Similar keys</title>
      <link>https://community.jmp.com/t5/Discussions/Similar-keys/m-p/770118#M95107</link>
      <description>&lt;P&gt;I would do this by utilizing SQL. This example should give an idea what you can do, you will have to do some cleanup on the values though&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt_main = Open("$DOWNLOADS/maintable(1).jmp");
dt_ref = Open("$DOWNLOADS/referencetable(1).jmp");

dt_concat = Query(
	Table(dt_main, "t1"),
	"\[SELECT type, "X Coord", "Y Coord", "Wafer ID", GROUP_CONCAT(Value, ', ') as Value
	FROM t1
    group by type, "X Coord", "Y Coord", "Wafer ID"
    ]\"
);

dt_split = dt_concat &amp;lt;&amp;lt; Split(
	Split By(:Type),
	Split(:Value),
	Group(:X Coord, :Y Coord, :Wafer ID)
);

dt_ref &amp;lt;&amp;lt; Update(
	With(dt_split),
	Match Columns(:X Coord = :X Coord, :Y Coord = :Y Coord, :Wafer ID = :Wafer ID),
	Add Columns from Update Table(:A, :B),
	Replace Columns in Main Table(None)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1720028422685.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65840i58DEF587F74CE1F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1720028422685.png" alt="jthi_0-1720028422685.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Add Listagg/Concatenate/GROUP_CONCAT to Summary platform" uid="441070" url="https://community.jmp.com/t5/JMP-Wish-List/Add-Listagg-Concatenate-GROUP-CONCAT-to-Summary-platform/m-p/441070#U441070" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;for a wishlist which should make this very easy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;Casting seems to be fairly simple way to get rid of the decimals&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt_main = Open("$DOWNLOADS/maintable(1).jmp");
dt_ref = Open("$DOWNLOADS/referencetable(1).jmp");

dt_concat = Query(
	Table(dt_main, "t1"),
	"\[SELECT type, "X Coord", "Y Coord", "Wafer ID", GROUP_CONCAT(CAST(Value as int), ', ') as Value
	FROM t1
    group by type, "X Coord", "Y Coord", "Wafer ID"
    ]\"
);

dt_split = dt_concat &amp;lt;&amp;lt; Split(
	Split By(:Type),
	Split(:Value),
	Group(:X Coord, :Y Coord, :Wafer ID)
);
Close(dt_concat, no save);

dt_ref &amp;lt;&amp;lt; Update(
	With(dt_split),
	Match Columns(:X Coord = :X Coord, :Y Coord = :Y Coord, :Wafer ID = :Wafer ID),
	Add Columns from Update Table(:A, :B),
	Replace Columns in Main Table(None)
);
Close(dt_split, no save);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Tue, 23 Jul 2024 17:16:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Similar-keys/m-p/770118#M95107</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-23T17:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Concat row values</title>
      <link>https://community.jmp.com/t5/Discussions/Similar-keys/m-p/770120#M95108</link>
      <description>&lt;P&gt;Thanks a lot Jarmo!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 17:49:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Similar-keys/m-p/770120#M95108</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2024-07-03T17:49:03Z</dc:date>
    </item>
  </channel>
</rss>

