WHERE clause using _DP _DPT etc for Oracle

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
3 posts • Page 1 of 1
jimtaylor
Posts:32
Joined: Tue Jun 11, 2013 10:18 am

WHERE clause using _DP _DPT etc for Oracle

Post by jimtaylor »

Hi,

Is there a different SQL syntax for "WHERE" clauses including _DP, _DPT, _EL etc in Oracle?

Example:

Code: Select all

string query = "SELECT ALERT 'alert_hdl.._text' FROM '*' WHERE _DPT != \\"_DataManager\\" TIMERANGE(\\"2016.09.01 00:00:00\\",\\"2016.09.01 23:59:59\\",1,0)";
dyn_dyn_anytype result;
dpQuery(query, result);
This works fine when using HDB archive but not on Oracle (returns the inverse - i.e. just the data manager alarms).

Thanks,

Jim

p.s. I know in this is a horrifically inefficient query, but just using it as a simple example to focus on the syntax problem.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: WHERE clause using _DP _DPT etc for Oracle

Post by leoknipp »

Hello,

are you queryRDBDirect = 1 when reading data for the Oracle database?
Have you tried if there is difference at the result when using queryRDBDirect = 0 and 1?

Best Regards
Leopold Knipp
Senior Support Specialist

chris@blue-catalyst.co.uk
Posts:32
Joined: Tue Jun 11, 2013 9:27 am

Re: WHERE clause using _DP _DPT etc for Oracle

Post by chris@blue-catalyst.co.uk »

Hi,

I have also come across problems with queries when using SELECT ALERT with TIMERANGE and ORACLE. I have tried Jim’s example above.

With queryRDBDirect = 0
_DPT = "_DataManager" returns all _DataManager alarms
_DPT != "_DataManager" returns all _DataManager alarms
_DPT LIKE "_Data*" returns nothing
_DPT NOT LIKE "_DataManager" returns nothing

With queryRDBDirect = 1 exactly the same results are returned, which aren't as anticipated.

Best regards,

Chris

3 posts • Page 1 of 1