<?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 join two tables? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361022#M106681</link>
    <description>&lt;P&gt;I'm a bit puzzled at what your (functional) end goal is here. Might be good to explain that (perhaps also rethink it yourself), to get some good suggestions on how to accomplish it.&lt;/P&gt;

&lt;P&gt;Glueing tables together like this does not make a whole lot of sense to me. But if you really need that, we would at least need a definition of how the tables should be glued together. In other words: how should splunk decide which rows from one table to merge with rows from the other table?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Feb 2018 08:59:59 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-02-08T08:59:59Z</dc:date>
    <item>
      <title>How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361016#M106675</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have a search:&lt;BR /&gt;
    &lt;CODE&gt;| savedsearch Cycle_11&lt;BR /&gt;
 | append&lt;BR /&gt;
        [| savedsearch Cycle_10]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;with the results:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4323i1C1B9B392917F906/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The result I want is something like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4324i26E444C41950DD0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;What do I need to do to get the result I want?&lt;BR /&gt;
I have tried appendcols but the results is somehow messed up.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Note: &lt;BR /&gt;
Both savedsearch returns more than 30,000 results.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I hope someone can help me with this.&lt;/P&gt;

&lt;P&gt;Thanks in advance and Best Regards &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 03:23:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361016#M106675</guid>
      <dc:creator>jvmerilla</dc:creator>
      <dc:date>2018-02-08T03:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361017#M106676</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch Cycle_11 | join ID [| savedsearch Cycle_10]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 03:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361017#M106676</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T03:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361018#M106677</link>
      <description>&lt;P&gt;I already tried join but what happen was that it duplicates the &lt;EM&gt;"Skill 12&lt;/EM&gt; from &lt;STRONG&gt;Field_1(CYCLE 10)&lt;/STRONG&gt; and the &lt;EM&gt;2&lt;/EM&gt; from &lt;STRONG&gt;Field_2(CYCLE 10)&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;It looks something like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;ID          Name            Field_1(CYCLE 10)       Field_2(CYCLE 10)             Field_1(CYCLE 11)          Field_2(CYCLE 11)&lt;/STRONG&gt;&lt;BR /&gt;
123        James           Skill 11                          0                                          Skill 11                              0&lt;BR /&gt;
123        James           Skill 12                          2                                          Skill 12                              2&lt;BR /&gt;
123        James           Skill 12                          2                                          Skill 13                              0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:58:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361018#M106677</guid>
      <dc:creator>jvmerilla</dc:creator>
      <dc:date>2020-09-29T17:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361019#M106678</link>
      <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch Cycle_11 | append [| savedsearch Cycle_10]
|rename Field_1* as  Field_1
|stats  latest(*) AS * BY ID,Name,Field_1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 06:05:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361019#M106678</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-02-08T06:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361020#M106679</link>
      <description>&lt;P&gt;Hi @HiroshiSatoh,&lt;/P&gt;

&lt;P&gt;Why do I have to rename fields?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 08:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361020#M106679</guid>
      <dc:creator>jvmerilla</dc:creator>
      <dc:date>2018-02-08T08:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361021#M106680</link>
      <description>&lt;P&gt;I tried it but I got this error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'rename' command: Wildcard mismatch:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 08:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361021#M106680</guid>
      <dc:creator>jvmerilla</dc:creator>
      <dc:date>2018-02-08T08:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361022#M106681</link>
      <description>&lt;P&gt;I'm a bit puzzled at what your (functional) end goal is here. Might be good to explain that (perhaps also rethink it yourself), to get some good suggestions on how to accomplish it.&lt;/P&gt;

&lt;P&gt;Glueing tables together like this does not make a whole lot of sense to me. But if you really need that, we would at least need a definition of how the tables should be glued together. In other words: how should splunk decide which rows from one table to merge with rows from the other table?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 08:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361022#M106681</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-02-08T08:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361023#M106682</link>
      <description>&lt;P&gt;Can you try this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch Cycle_11 | appendcols [| savedsearch Cycle_10]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 09:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361023#M106682</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-08T09:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361024#M106683</link>
      <description>&lt;P&gt;HI @mayurr98, &lt;/P&gt;

&lt;P&gt;I already tried appendcols but the problem is that the result is messed up.&lt;BR /&gt;
The alignment of some of the fields is wrong because there are some fields with no values.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 09:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361024#M106683</guid>
      <dc:creator>jvmerilla</dc:creator>
      <dc:date>2018-02-08T09:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361025#M106684</link>
      <description>&lt;P&gt;It was a mistake. "rename" is for use with By.&lt;/P&gt;

&lt;P&gt;| savedsearch Cycle_11 | append [| savedsearch Cycle_10]&lt;BR /&gt;
 |rename Field_1(CYCLE 10) as  Field_1&lt;BR /&gt;
 |rename Field_1(CYCLE 11) as  Field_1&lt;BR /&gt;
 |stats  latest(*) AS * BY ID,Name,Field_1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:02:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361025#M106684</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2020-09-29T18:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361026#M106685</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch Cycle_11 | append [| savedsearch Cycle_10]|eval "Field_1"=coalesce('Field_1(CYCLE 11)','Field_1(CYCLE 10)')|stats values(*) as *  BY Field_1|table ID Name *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 10:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-two-tables/m-p/361026#M106685</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T10:39:43Z</dc:date>
    </item>
  </channel>
</rss>

