Sparql Query fails with ORA-00923: FROM Keyword Not Found Where Expected error (Doc ID 2053342.1)

Last updated on SEPTEMBER 09, 2015

Applies to:

Oracle Spatial and Graph - Version 12.1.0.1 and later
Information in this document applies to any platform.

Goal

SPARQL query fails with:

SELECT countthis, count10 FROM TABLE(SEM_MATCH(
'PREFIX r:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX
u:<http://purl.uniprot.org/uniprot/> PREFIX
x:<http://www.w3.org/2001/XMLSchema#> SELECT  (COUNT(DISTINCT(?this))
AS
?countthis) (COUNT(DISTINCT(?10)) AS ?count10) WHERE { ?this :organism
?taxon2;  :sequence ?01,  ?ts1;  rd:seeAlso ha:MF_00942 .  ?01 r:value
?21 .  ?ts1 r:value ?tsv1 .  { ?taxon2 rd:subClassOf t:2 .  } UNION {
?taxon2 rd:subClassOf t:2157 .  } BIND(STRLEN(?tsv1) AS ?l177_3903) .
FILTER (((?l177_3903 >= 177) && (?l177_3903 <= 390))) . OPTIONAL { ?31

..

ORA-00923: FROM keyword not found where expected


The SPARQL query is valid according to sparql.org, arq.

The sesame SPARQL parser accepts it as well.
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms