<?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: Splunk DB Connect: How does the rising column work for the &amp;quot;union all&amp;quot; in this query? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246307#M27975</link>
    <description>&lt;P&gt;I don't know if the recent versions of the ODBC drivers used in DB Connect support Common Table Expressions, a form of pseudo views, but here are a couple of articles explaining how to use them&lt;/P&gt;

&lt;P&gt;&lt;A href="https://oracle-base.com/articles/misc/with-clause"&gt;Oracle Common Table Expression&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://technet.microsoft.com/en-us/library/ms190766(v=sql.105).aspx"&gt;SQL Server Common Table Expression&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I seem to recall I had difficulties using them in earlier versions of DB Connect&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2017 09:11:05 GMT</pubDate>
    <dc:creator>davebrooking</dc:creator>
    <dc:date>2017-02-08T09:11:05Z</dc:date>
    <item>
      <title>Splunk DB Connect: How does the rising column work for the "union all" in this query?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246304#M27972</link>
      <description>&lt;P&gt;How does the rising column work for the "union all" in this query? &lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Select * from table1 where date &amp;gt; last 1 hour 
Union all
Select * from table2 where date &amp;gt; last 1 hour
Union all
Select * from table3 where date &amp;gt; last 1 hour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Rising column: date&lt;/P&gt;

&lt;P&gt;In the above case, Splunk is allowing the rising column only at one of the query. So if I use the rising column with the first query (like below), I am receiving full and duplicate data for table2 and table3.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Select * from table1 where date &amp;gt; last 1 hour {{AND $rising_column$ &amp;gt; ?}}
Union all
Select * from table2 where date &amp;gt; last 1 hour
Union all
Select * from table3 where date &amp;gt; last 1 hour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Currently I have to create 3 separate inputs for this so was wondering if there is an easy way to fix this and have all queries accommodated into single input using "union all"???&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 20:21:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246304#M27972</guid>
      <dc:creator>ash2l</dc:creator>
      <dc:date>2017-01-18T20:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect: How does the rising column work for the "union all" in this query?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246305#M27973</link>
      <description>&lt;P&gt;Make a view of the union of all three tables, then &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Select * from view  where  {{ $rising_column$ &amp;gt; ?}}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2017 13:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246305#M27973</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2017-01-30T13:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect: How does the rising column work for the "union all" in this query?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246306#M27974</link>
      <description>&lt;P&gt;We dont have access to create a view in the production database. Do you think of any other option? If not, I guess we can have separate data inputs for each queries instead of using "union all"&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 05:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246306#M27974</guid>
      <dc:creator>ash2l</dc:creator>
      <dc:date>2017-02-08T05:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect: How does the rising column work for the "union all" in this query?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246307#M27975</link>
      <description>&lt;P&gt;I don't know if the recent versions of the ODBC drivers used in DB Connect support Common Table Expressions, a form of pseudo views, but here are a couple of articles explaining how to use them&lt;/P&gt;

&lt;P&gt;&lt;A href="https://oracle-base.com/articles/misc/with-clause"&gt;Oracle Common Table Expression&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://technet.microsoft.com/en-us/library/ms190766(v=sql.105).aspx"&gt;SQL Server Common Table Expression&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I seem to recall I had difficulties using them in earlier versions of DB Connect&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 09:11:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246307#M27975</guid>
      <dc:creator>davebrooking</dc:creator>
      <dc:date>2017-02-08T09:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect: How does the rising column work for the "union all" in this query?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246308#M27976</link>
      <description>&lt;P&gt;Try to modify query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;select *
from (Select * from table1 
    Union all
    Select * from table2
    Union all
    Select * from table3
    )
where date &amp;gt; last 1 hour
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jan 2020 13:42:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-How-does-the-rising-column-work-for-the-quot/m-p/246308#M27976</guid>
      <dc:creator>splunk6161</dc:creator>
      <dc:date>2020-01-29T13:42:49Z</dc:date>
    </item>
  </channel>
</rss>

