1 Reply Latest reply on Jan 17, 2008 9:14 PM by Mannamal-Oracle

    Filter don't work in Oracle 11g . Solved

    68458
      EDIT: I have found the problem. The h variable is managed into filter clause as string and into where clause as numeric (I don't know what is the reason of this different treatment), so into filter clause it is necesary to convert to numeric, to_number(h). The query:

      SELECT m, h
      FROM TABLE(SEM_MATCH(
      '(?m rdf:type :Male) ( ?m :height ?h )',
      SEM_Models('family'),
      NULL,
      SEM_Aliases(SEM_Alias('','http://www.example.org/family/')),
      '(to_number(h) = 6)'))

      works.


      I have Oracle 11g with jena patch, I use the family example. When I perform the folowing query:

      SELECT m, h
      FROM TABLE(SEM_MATCH(
      '(?m rdf:type :Male) ( ?m :height ?h )',
      SEM_Models('family'),
      NULL,
      SEM_Aliases(SEM_Alias('','http://www.example.org/family/')),
      null))
      where h=6

      Oracle retrieves:
      http://www.example.org/family/Jack 6

      but when I perform the restriction into the filter clause like this:

      SELECT m, h
      FROM TABLE(SEM_MATCH(
      '(?m rdf:type :Male) ( ?m :height ?h )',
      SEM_Models('family'),
      NULL,
      SEM_Aliases(SEM_Alias('','http://www.example.org/family/')),
      '(h = 6)'))

      I get the error: ORA-00600: c¾digo de error interno, argumentos:
      [qksvcProcessExprCBK_fail]

      my NLS settings in spfile settings are: NLS_Territory=SPAIN , NLS_Language=SPAIN

      I use an incorrect sintaxis for filter clause? If it`s true could someone provide a correct example of query. If not what'is the problem?

      Thanks in advance

      Juan

      Message was edited by:
      ow007219
        • 1. Re: Filter don't work in Oracle 11g . Solved
          Mannamal-Oracle
          I am glad you figured it out. We need to point this out in sample queries in our documentation. The values in the SELECT statement do not have type information associated with them when they are used in the filter clause (whereas the WHERE clause figures out the type information). Hence the explicit conversion to the required type was needed when the filter clause is used.

          Melli