2 Replies Latest reply on Jun 20, 2016 5:49 PM by 3054700

    Long SEM_MATCH query

    3054700

      Dear all,

       

      I can't figure out how to execute a query of more than 4000 characters using SEM_MATCH function. If the query is over 4000 chars, the "ORA-01704: string literal too long" error is returned.


      I tried to split it in shorter strings i.e


      SELECT * FROM TABLE(SEM_MATCH(
      'part1 with less than 4000 chars...' || 'part2 with less than 4000 chars...',
      SEM_Models('model'), NULL, NULL, NULL, NULL, 'REWRITE=F DISABLE_NO_MERGE'))
      

       

      Trying a concatenation of shorter strings returns:

       

      ORA-20000: RDF_MATCH Query pattern must be a non-null compile-time constant.

      ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 224

      ORA-06512: at line 4

      20000. 00000 -  "%s"

      *Cause:    The stored procedure 'raise_application_error'

                 was called which causes this error to be generated.

      *Action:   Correct the problem as described in the error message or contact

                 the application administrator or DBA for more information.

       

      Any help appreciated

      Fred