<?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: Joining two fields together in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-fields-together/m-p/19349#M2932</link>
    <description>&lt;P&gt;Coalesce is probably not what you want; it picks the first non-null from the list and returns that.  Instead, string manipulation will do what you want:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
eval newField=EventCodeDescription + sfailed&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jul 2012 19:55:57 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2012-07-27T19:55:57Z</dc:date>
    <item>
      <title>Joining two fields together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-fields-together/m-p/19347#M2930</link>
      <description>&lt;P&gt;How do I join two fields together so there is not whitespace in my table. I want to join sfailed and EventCodeDescription so that it will list "Shutdown or reboot"&lt;/P&gt;

&lt;P&gt;index="Desktop" (EventCode=513 OR EventCode=3003) OR reboot EventCodeDescription= "sfailed" OR "Shutdown"| rex"Shutdown\s\S+(?&lt;SFAILED&gt;\s\S+)" | table _time sfailed host user EventCodeDescription | rename _time AS Time | convert timeformat="%H/%M/%S %d.%m.%Y" ctime(Time) | rename user AS Username | rename host AS "Machine Name" EventCodeDescription AS "Description" &lt;/SFAILED&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 11:07:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-fields-together/m-p/19347#M2930</guid>
      <dc:creator>Michael_Schyma1</dc:creator>
      <dc:date>2012-07-27T11:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two fields together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-fields-together/m-p/19348#M2931</link>
      <description>&lt;P&gt;You should probably use &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/searchreference/eval"&gt;eval&lt;/A&gt; to create a new field, and then use &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;coalesce&lt;/A&gt; to combine these two fields. e.g.&lt;/P&gt;

&lt;P&gt;...| eval newField=coalesce(EventCodeDescription,sfailed)|...&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 11:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-fields-together/m-p/19348#M2931</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-07-27T11:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two fields together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-fields-together/m-p/19349#M2932</link>
      <description>&lt;P&gt;Coalesce is probably not what you want; it picks the first non-null from the list and returns that.  Instead, string manipulation will do what you want:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
eval newField=EventCodeDescription + sfailed&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 19:55:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-fields-together/m-p/19349#M2932</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-07-27T19:55:57Z</dc:date>
    </item>
  </channel>
</rss>

