<?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: insert the earliest and latest in the DBquery in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/insert-the-earliest-and-latest-in-the-DBquery/m-p/81471#M181868</link>
    <description>&lt;P&gt;Thanks for your fast answer, you have gave me a different point of view and I like it.&lt;BR /&gt;
It's a great solution.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 04 Oct 2013 06:44:51 GMT</pubDate>
    <dc:creator>radomo</dc:creator>
    <dc:date>2013-10-04T06:44:51Z</dc:date>
    <item>
      <title>insert the earliest and latest in the DBquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/insert-the-earliest-and-latest-in-the-DBquery/m-p/81469#M181866</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I'm breaking my brain for make one thing. I recovery the data from External database, in this point no problem, the problem success when I need insert the earliest and latest in the query.&lt;/P&gt;

&lt;P&gt;is it possible make this? or in the other hand am I trying something impossible?&lt;/P&gt;

&lt;P&gt;I'd tried to resolve with insert the variable into the splunkQuery but nothing.&lt;/P&gt;

&lt;P&gt;This is the query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="time"&amp;gt;
        &amp;lt;default&amp;gt;Last 7 days&amp;lt;/default&amp;gt; 
      &amp;lt;/input&amp;gt;
      &amp;lt;searchString&amp;gt;| dbquery mydb limit=1000 "select DATE_FORMAT(en.fechaExpedicion,'%d-%m-%Y') as fecha, sum(something) as adds WHERE DATE(en.date) BETWEEN DATE($earliestTime$)  AND DATE($latestTime$) " | table fecha, * | addtotals fieldname="TOTAL DIA" *
&amp;lt;/searchString&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Oct 2013 15:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/insert-the-earliest-and-latest-in-the-DBquery/m-p/81469#M181866</guid>
      <dc:creator>radomo</dc:creator>
      <dc:date>2013-10-03T15:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: insert the earliest and latest in the DBquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/insert-the-earliest-and-latest-in-the-DBquery/m-p/81470#M181867</link>
      <description>&lt;P&gt;There isn't a previous search to pull earliest/latest times. You could put in fields that take earliest and latest.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;input type="text" token="earliestDBTime" /&amp;gt;&amp;lt;input type="text"token="latestDBTime" /&amp;gt;&lt;BR /&gt;
&amp;lt;searchString&amp;gt; |dbquery mydb limit=10000 "select DATE_FORMAT(......) | table fecha * |addtotals fieldname="TOTAL DIA" * &amp;lt;/searchString&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2013 16:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/insert-the-earliest-and-latest-in-the-DBquery/m-p/81470#M181867</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-10-03T16:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: insert the earliest and latest in the DBquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/insert-the-earliest-and-latest-in-the-DBquery/m-p/81471#M181868</link>
      <description>&lt;P&gt;Thanks for your fast answer, you have gave me a different point of view and I like it.&lt;BR /&gt;
It's a great solution.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2013 06:44:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/insert-the-earliest-and-latest-in-the-DBquery/m-p/81471#M181868</guid>
      <dc:creator>radomo</dc:creator>
      <dc:date>2013-10-04T06:44:51Z</dc:date>
    </item>
  </channel>
</rss>

