Splunk Search

Problem executing ORACLE subquery in DB Connect...

Adam_Marx
Explorer

I'm running into a problem when executing a subquery in DB Connect.

When the query is executing through SQL Developer it executes fine but when executed in SQL Explorer in DB Connect I get an error message "java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis".

I've narrowed it down to essentially the subquery portion of the query... is this a known issue, any work arounds?

     SELECT * FROM (
       SELECT c."Name" AS ItemName, LTRIM(p."Name",'_') AS ItemProperty, TO_CHAR(p."Value") AS Value, 
            CASE c."Type"  
                    WHEN 2 THEN 'View'
                    WHEN 8 THEN 'Canvas'
             END AS Type
       FROM "CATALOGITEM" c, "PROPERTY" p
       WHERE 
       p."ItemID" = c."ID"
       AND LENGTH(p."Value") > 0        --check for blank CLOB
        AND c."Name" = 'AL'
       AND c."Type" = 2
            OR c."Type" = 8 
       AND p."Name" = 'DateModified'
             OR p."Name" = 'DateAccessed'
             OR p."Name" = 'UserAccessed'
             OR p."Name" = 'AccessCount'
             OR p."Name" = 'Database'
) Tmp
Tags (1)
0 Karma

Adam_Marx
Explorer

Just a follow up in case someone else runs into this.. removing the comment "--check for blank CLOB" fixed the issue.

AND LENGTH(p."Value") > 0 --check for blank CLOB

Adam,

0 Karma

p_gurav
Champion
0 Karma

Adam_Marx
Explorer

The query executes fine in ORACLE so I'm not understanding the error

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...