<?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: Join 2 searches on 2 different columns in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321071#M95918</link>
    <description>&lt;P&gt;Can you share sample data.&lt;/P&gt;

&lt;P&gt;Also try this..&lt;/P&gt;

&lt;P&gt;index=A number=RU status=SUBMITTED | dedup x_requestid| table x_requestid | join x_requestid [search index=A status=INELIGIBLE | rename request_id as x_requestid | dedup x_requestid | table x_requestid]&lt;/P&gt;

&lt;P&gt;Or&lt;/P&gt;

&lt;P&gt;index=A status=INELIGIBLE | rename request_id as x_requestid | dedup x_requestid | table x_requestid |  join x_requestid [search index=A number=RU status=SUBMITTED | dedup x_requestid| table x_requestid]&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 18:15:32 GMT</pubDate>
    <dc:creator>anjambha</dc:creator>
    <dc:date>2020-09-29T18:15:32Z</dc:date>
    <item>
      <title>Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321066#M95913</link>
      <description>&lt;P&gt;I have 2 searches and i want to join the results of both of them into 1 table of x_requestid's. The respective result column in each search has a different name&lt;/P&gt;

&lt;P&gt;Search 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A number=RU status=SUBMITTED | table x_requestid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A status=INELIGIBLE | rename request_id as x_requestid | table x_requestid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These individual searches provide exactly what I need, but when I try to join them I get nothing. Here's my join query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A number=RU status=SUBMITTED | table x_requestid | join x_requestid [search index=A status=INELIGIBLE | rename request_id as x_requestid | fields x_requestid] | table x_requestid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Mar 2018 02:33:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321066#M95913</guid>
      <dc:creator>xiaohenry</dc:creator>
      <dc:date>2018-03-07T02:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321067#M95914</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Try this.&lt;BR /&gt;
    index=A number=RU status=SUBMITTED | table x_requestid | join x_requestid [search index=A status=INELIGIBLE | rename request_id as x_requestid | table x_requestid]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:19:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321067#M95914</guid>
      <dc:creator>anjambha</dc:creator>
      <dc:date>2020-09-29T18:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321068#M95915</link>
      <description>&lt;P&gt;Above search represent Left join so as per your requirement you can manipulate your search or change join type=[Left|outer] for more information refer splunk join command doc.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 04:54:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321068#M95915</guid>
      <dc:creator>anjambha</dc:creator>
      <dc:date>2018-03-07T04:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321069#M95916</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I think both the table would have duplicate values which will give you improper results after joining both tables.&lt;BR /&gt;
You can try something like this .&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A number=RU status=SUBMITTED 
| stats count as submitted_count by x_requestid 
| join x_requestid 
    [ search index=A status=INELIGIBLE 
    | stats count as ineligible_count by request_id 
    | rename request_id as x_requestid]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 05:41:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321069#M95916</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-07T05:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321070#M95917</link>
      <description>&lt;P&gt;Just realized I had a mistake in my original search. This works too, thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:06:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321070#M95917</guid>
      <dc:creator>xiaohenry</dc:creator>
      <dc:date>2018-03-07T17:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321071#M95918</link>
      <description>&lt;P&gt;Can you share sample data.&lt;/P&gt;

&lt;P&gt;Also try this..&lt;/P&gt;

&lt;P&gt;index=A number=RU status=SUBMITTED | dedup x_requestid| table x_requestid | join x_requestid [search index=A status=INELIGIBLE | rename request_id as x_requestid | dedup x_requestid | table x_requestid]&lt;/P&gt;

&lt;P&gt;Or&lt;/P&gt;

&lt;P&gt;index=A status=INELIGIBLE | rename request_id as x_requestid | dedup x_requestid | table x_requestid |  join x_requestid [search index=A number=RU status=SUBMITTED | dedup x_requestid| table x_requestid]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:15:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321071#M95918</guid>
      <dc:creator>anjambha</dc:creator>
      <dc:date>2020-09-29T18:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321072#M95919</link>
      <description>&lt;P&gt;Just realized I had a mistake in my original search. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:37:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321072#M95919</guid>
      <dc:creator>xiaohenry</dc:creator>
      <dc:date>2018-03-07T17:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 searches on 2 different columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321073#M95920</link>
      <description>&lt;P&gt;If your problem is resolved, accept the correct answer for future readers and so that  this question no longer appears open.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 18:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-searches-on-2-different-columns/m-p/321073#M95920</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-07T18:07:58Z</dc:date>
    </item>
  </channel>
</rss>

