<?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 Why am I unable to fetch data by using column names? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-fetch-data-by-using-column-names/m-p/187344#M53968</link>
    <description>&lt;P&gt;Case 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz | rex "(?i)&amp;lt;ticketId&amp;gt;(?P&amp;lt;TICKETID&amp;gt;[^&amp;lt;;]+)"  | stats values(TICKETID) as TICKETID by processname | where TICKETID NOT NULL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;TICKET ID - numeric eg : 23517727&lt;BR /&gt;
processname - string eg : abc&lt;/P&gt;

&lt;P&gt;I am trying to fetch TICKET ID details by distinct values of processname using the search above.  It displays "no results found". &lt;/P&gt;

&lt;P&gt;Case 2:&lt;BR /&gt;
For the above search, if I remove the where clause, it displays both the processname and TICKETID columns where TICKETID column is empty.&lt;/P&gt;

&lt;P&gt;Case 3: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz | rex "(?i)&amp;lt;ticketId&amp;gt;(?P&amp;lt;TICKETID&amp;gt;[^&amp;lt;]+)"  | stats values(TICKETID) as TICKETID by id | where TICKETID NOT NULL 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;id -  string eg: 143543337d5ea380261d5b318186dc4a28db9edb0&lt;/P&gt;

&lt;P&gt;It gives me the results of distinct values of id with corresponding TICKETID values. I want the case 1 in this format.&lt;/P&gt;

&lt;P&gt;-- id is a kind of primary key in this scenario where as processname isn't.&lt;/P&gt;

&lt;P&gt;I am new in using splunk. Please do help me asap.&lt;/P&gt;

&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2015 20:27:37 GMT</pubDate>
    <dc:creator>gunturu_nagasri</dc:creator>
    <dc:date>2015-06-30T20:27:37Z</dc:date>
    <item>
      <title>Why am I unable to fetch data by using column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-fetch-data-by-using-column-names/m-p/187344#M53968</link>
      <description>&lt;P&gt;Case 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz | rex "(?i)&amp;lt;ticketId&amp;gt;(?P&amp;lt;TICKETID&amp;gt;[^&amp;lt;;]+)"  | stats values(TICKETID) as TICKETID by processname | where TICKETID NOT NULL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;TICKET ID - numeric eg : 23517727&lt;BR /&gt;
processname - string eg : abc&lt;/P&gt;

&lt;P&gt;I am trying to fetch TICKET ID details by distinct values of processname using the search above.  It displays "no results found". &lt;/P&gt;

&lt;P&gt;Case 2:&lt;BR /&gt;
For the above search, if I remove the where clause, it displays both the processname and TICKETID columns where TICKETID column is empty.&lt;/P&gt;

&lt;P&gt;Case 3: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz | rex "(?i)&amp;lt;ticketId&amp;gt;(?P&amp;lt;TICKETID&amp;gt;[^&amp;lt;]+)"  | stats values(TICKETID) as TICKETID by id | where TICKETID NOT NULL 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;id -  string eg: 143543337d5ea380261d5b318186dc4a28db9edb0&lt;/P&gt;

&lt;P&gt;It gives me the results of distinct values of id with corresponding TICKETID values. I want the case 1 in this format.&lt;/P&gt;

&lt;P&gt;-- id is a kind of primary key in this scenario where as processname isn't.&lt;/P&gt;

&lt;P&gt;I am new in using splunk. Please do help me asap.&lt;/P&gt;

&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 20:27:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-fetch-data-by-using-column-names/m-p/187344#M53968</guid>
      <dc:creator>gunturu_nagasri</dc:creator>
      <dc:date>2015-06-30T20:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to fetch data by using column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-fetch-data-by-using-column-names/m-p/187345#M53969</link>
      <description>&lt;P&gt;Please share some sample data so we can put your fields into context.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 20:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-fetch-data-by-using-column-names/m-p/187345#M53969</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-06-30T20:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to fetch data by using column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-fetch-data-by-using-column-names/m-p/187346#M53970</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;P&gt;Case 1 and 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=xyz | rex "(?i)&amp;lt;ticketId&amp;gt;(?&amp;lt;TICKETID&amp;gt;[^&amp;lt;;]+)"  | stats values(TICKETID) as TICKETID by processname | where isnotnull(TICKETID)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Case 3:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=xyz | rex "(?i)&amp;lt;ticketId&amp;gt;(?&amp;lt;TICKETID&amp;gt;[^&amp;lt;]+)"  | stats values(TICKETID) as TICKETID by id | where isnotnull(TICKETID)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jun 2015 21:13:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-fetch-data-by-using-column-names/m-p/187346#M53970</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-30T21:13:11Z</dc:date>
    </item>
  </channel>
</rss>

