Kumar,

I have pointhed to this resource on Stackoverflow before.

http://stackoverflow.com/help/mcve
"How to create a Minimal, Complete, and Verifiable example"

Your example is not complete, nor verifiable.

Not complete: no prefixes, no indication of what name is, nothing to show how you are using the query

Not verifiable: not some code that someone can take and out in their environment without having to guess the missing details.


What is more there are online resources to check syntax:

http://www.sparql.org/query-validator.html

        Andy







On 22/10/16 13:30, kumar rohit wrote:
The error is :

Encountered " "(" "( "" at line 1, column 221.
Was expecting one of:
    "graph" ...
    "optional" ...
    "minus" ...
    "bind" ...
    "service" ...
    "filter" ...
    "{" ...
    "}" ...
    ";" ...
    "," ...
    "." ...

On Sat, Oct 22, 2016 at 3:19 PM, Lorenz B. <
[email protected]> wrote:

Kumar,

probably missing space between ?result and FILTER. Why don't you print
the String and show it to us? Nobody wants to read Java concatenated
String objects.
Is the query correct? It gives me error, I think syntax error.

  "SELECT  * " +
                " WHERE {   ?student std:result ?result"
                   + "FILTER ( ?student =' "+name+" ' ) " +

          "}";

name is java variable

--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center



Reply via email to