<?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: Is it possible to change case of a column name? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94654#M24444</link>
    <description>&lt;P&gt;That's a way to get the dynamic column name thing solved.  &lt;/P&gt;</description>
    <pubDate>Tue, 16 Oct 2018 12:10:44 GMT</pubDate>
    <dc:creator>grantsmiley</dc:creator>
    <dc:date>2018-10-16T12:10:44Z</dc:date>
    <item>
      <title>Is it possible to change case of a column name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94650#M24440</link>
      <description>&lt;P&gt;I would like to change case of column name. Is it possible. My column name changes at run time and is not known at the time of writing the query&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2013 05:51:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94650#M24440</guid>
      <dc:creator>ma_anand1984</dc:creator>
      <dc:date>2013-07-15T05:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change case of a column name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94651#M24441</link>
      <description>&lt;P&gt;I am guessing you want the column name to be renamed for the result of the search?&lt;/P&gt;

&lt;P&gt;If that is the case you can pipe your search to &lt;/P&gt;

&lt;P&gt;| rename column_name AS "your_new_name"&lt;/P&gt;

&lt;P&gt;if you want to change the name of the field before doing calculations with the new name, you should use the eval command&lt;/P&gt;

&lt;P&gt;| eval new_name=old_name&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94651#M24441</guid>
      <dc:creator>asimagu</dc:creator>
      <dc:date>2020-09-28T14:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change case of a column name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94652#M24442</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/130563"&gt;@asimagu&lt;/a&gt; Thanks for your reply but it didnt answer my query. I dont know the column name. it is created at run time.&lt;BR /&gt;
| rename column_name AS "your_new_name". i want "your_new_name" to be like "COLUMN_NAME" - upper case of whatever is present in the column&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:21:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94652#M24442</guid>
      <dc:creator>ma_anand1984</dc:creator>
      <dc:date>2020-09-28T14:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change case of a column name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94653#M24443</link>
      <description>&lt;P&gt;see if this helps you &lt;BR /&gt;
&lt;CODE&gt;| foreach *   [| eval "uppered&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;"='&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;' ]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 12:08:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94653#M24443</guid>
      <dc:creator>grantsmiley</dc:creator>
      <dc:date>2018-10-16T12:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change case of a column name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94654#M24444</link>
      <description>&lt;P&gt;That's a way to get the dynamic column name thing solved.  &lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 12:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94654#M24444</guid>
      <dc:creator>grantsmiley</dc:creator>
      <dc:date>2018-10-16T12:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change case of a column name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94655#M24445</link>
      <description>&lt;P&gt;If you want ALL fieldnames to be upper case, then do this at the end...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| streamstats count as recno
| untable recno fieldname fieldvalue
| eval fieldname = upper(fieldname)
| xyseries recno fieldname fieldvalue
| fields - recno
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Be aware that the above code will turn multivalue fields to single value fields as if they had been &lt;CODE&gt;nomv&lt;/CODE&gt;ed.  The following code will protect an mv field called "foo".&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| streamstats count as recno
| eval foo = mvjoin(foo,"!!!!")
| untable recno fieldname fieldvalue
| eval fieldname = upper(fieldname)
| xyseries recno fieldname fieldvalue
| eval FOO = split(FOO,"!!!!")
| fields - recno
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Oct 2018 14:06:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-change-case-of-a-column-name/m-p/94655#M24445</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-10-16T14:06:01Z</dc:date>
    </item>
  </channel>
</rss>

