<?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: DB Connect - Oracle - Single quote in query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-Oracle-Single-quote-in-query/m-p/124216#M184262</link>
    <description>&lt;P&gt;Single quotes can be escaped with a back slash: &lt;CODE&gt;\'&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jun 2014 00:39:51 GMT</pubDate>
    <dc:creator>pmdba</dc:creator>
    <dc:date>2014-06-03T00:39:51Z</dc:date>
    <item>
      <title>DB Connect - Oracle - Single quote in query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-Oracle-Single-quote-in-query/m-p/124215#M184261</link>
      <description>&lt;P&gt;I am have the following stanza in my inputs.conf.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dbmon-tail://DB/TABLE]
interval = 1m
query = SELECT SL_UID,SL_TIMESTAMP,from_tz(SL_TIMESTAMP, 'Europe/London') AT TIME ZONE 'UTC' AS SL_TIMESTAMP_UTC FROM schema.TABLE {{WHERE $rising_column$ &amp;gt; ?}}
tail.rising.column = SL_UID
output.format = kv
output.timestamp.column = SL_TIMESTAMP
sourcetype = mydata
disabled = 0
index=test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I run the query from Oracle's SQL Developer, I get the expected one hour difference between &lt;CODE&gt;SL_TIMESTAMP&lt;/CODE&gt; and &lt;CODE&gt;SL_TIMESTAMP_UTC&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;The output from Splunk DBX is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2014-04-08T15:00:45.000 SL_UID=21342912 SL_TIMESTAMP_UTC=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Having decompiled &lt;CODE&gt;dbx.jar&lt;/CODE&gt;, I &lt;EM&gt;think&lt;/EM&gt; the problem is in &lt;CODE&gt;com.splunk.util.Utils.unescapeString()&lt;/CODE&gt; not unescaping the single quote &lt;CODE&gt;'&lt;/CODE&gt; correctly.&lt;/P&gt;

&lt;P&gt;Is this a bug or have I configured something incorrectly?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 14:12:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-Oracle-Single-quote-in-query/m-p/124215#M184261</guid>
      <dc:creator>johnoxley_liqui</dc:creator>
      <dc:date>2014-04-08T14:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect - Oracle - Single quote in query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-Oracle-Single-quote-in-query/m-p/124216#M184262</link>
      <description>&lt;P&gt;Single quotes can be escaped with a back slash: &lt;CODE&gt;\'&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jun 2014 00:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-Oracle-Single-quote-in-query/m-p/124216#M184262</guid>
      <dc:creator>pmdba</dc:creator>
      <dc:date>2014-06-03T00:39:51Z</dc:date>
    </item>
  </channel>
</rss>

