<?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 can I modify this query without the join command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279084#M84285</link>
    <description>&lt;P&gt;Hi uhkc777,&lt;/P&gt;

&lt;P&gt;you can use something like this - sorry not tested and it is early morning for me so don't &lt;CODE&gt;blame&lt;/CODE&gt; me if it does not work straight away &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Pharma_ParMed_STG sourcetype=ParMed-SalesOrder source="DBX:ParMed-Stage"  OR index=Pharma_ECC_STG sourcetype=SAP-SalesOrder source="DBX:SE8"
| eval OrderId = coalesce(OrderId, SALESORDERNUM)
| eval OrderDetailID = coalesce(OrderDetailID, ITEMDETAILID)
| stats count(index) AS c_idx by OrderId OrderDetailID
| where c_idx = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this gets you started ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2016 19:43:18 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2016-10-24T19:43:18Z</dc:date>
    <item>
      <title>How can I modify this query without the join command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279082#M84283</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=Pharma_ParMed_STG sourcetype=ParMed-SalesOrder source="DBX:ParMed-Stage" 
|table OrderEntryDate OrderId OrderDetailID CAHInventoryNum OrderedQuantity 
| join  type=outer OrderId OrderDetailID [
       |search index=Pharma_ECC_STG sourcetype=SAP-SalesOrder source="DBX:SE8"
       |eval itemid=ITEMDETAILID,salesordernum=SALESORDERNUM
       |rename ITEMDETAILID as OrderDetailID,SALESORDERNUM as OrderId
       |table OrderId OrderDetailID salesordernum]
 |search NOT salesordernum=*
 |fields - salesordernum|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It simply shows the missing orders between this 2 indexes.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 19:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279082#M84283</guid>
      <dc:creator>uhkc777</dc:creator>
      <dc:date>2016-10-24T19:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I modify this query without the join command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279083#M84284</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=Pharma_ParMed_STG sourcetype=ParMed-SalesOrder source="DBX:ParMed-Stage" ) OR (index=Pharma_ECC_STG sourcetype=SAP-SalesOrder source="DBX:SE8") | eval OrderDetailID=coalesce(OrderDetailID, ITEMDETAILID) | eval  OrderId = coalesce(OrderId, SALESORDERNUM) | stats dc(sourcetype) as missing latest(OrderEntryDate) as OrderEntryDate latest(OrderId) as OrderId latest(CAHInventoryNum) as CAHInventoryNum latest(OrderedQuantity) as OrderedQuantity by OrderId OrderDetailID | where missing&amp;lt;2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Oct 2016 19:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279083#M84284</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-24T19:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I modify this query without the join command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279084#M84285</link>
      <description>&lt;P&gt;Hi uhkc777,&lt;/P&gt;

&lt;P&gt;you can use something like this - sorry not tested and it is early morning for me so don't &lt;CODE&gt;blame&lt;/CODE&gt; me if it does not work straight away &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Pharma_ParMed_STG sourcetype=ParMed-SalesOrder source="DBX:ParMed-Stage"  OR index=Pharma_ECC_STG sourcetype=SAP-SalesOrder source="DBX:SE8"
| eval OrderId = coalesce(OrderId, SALESORDERNUM)
| eval OrderDetailID = coalesce(OrderDetailID, ITEMDETAILID)
| stats count(index) AS c_idx by OrderId OrderDetailID
| where c_idx = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this gets you started ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 19:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279084#M84285</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-10-24T19:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I modify this query without the join command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279085#M84286</link>
      <description>&lt;P&gt;@uhkc777, &lt;/P&gt;

&lt;P&gt;Our community moderators noticed that you have posted duplicate questions regarding the join command.&lt;BR /&gt;
- This post: &lt;A href="https://answers.splunk.com/answers/468914/how-can-i-modify-this-query-without-the-join-comma.html"&gt;https://answers.splunk.com/answers/468914/how-can-i-modify-this-query-without-the-join-comma.html&lt;/A&gt;&lt;BR /&gt;
- Duplicate: &lt;A href="https://answers.splunk.com/answers/468917/how-to-modify-this-query-without-join-command.html"&gt;https://answers.splunk.com/answers/468917/how-to-modify-this-query-without-join-command.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please refrain from posting duplicate questions as this creates unnecessary clutter on the forum.&lt;/P&gt;

&lt;P&gt;Though the duplicate question (second link) has already been closed, I will be deleting the question now.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 20:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-modify-this-query-without-the-join-command/m-p/279085#M84286</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2016-10-24T20:06:39Z</dc:date>
    </item>
  </channel>
</rss>

