Hello Claude and Andy,

from what I understand now, the query can be parsed but the result is
empty.

@Kumar Again, without having ALL NECESSARY information, i.e.


1) the latest SPARQL query AND

2) example data


it's impossible to help.


Cheers,
Lorenz

> As an earlier post noted there is no space before the "FILTER".  so your
> query has the string
> "?resultFilter(".  To the parser this will look like a badly formed
> variable name and the "(" will be flagged as the invalid character.
>
> On Tue, Oct 25, 2016 at 8:46 PM, Andy Seaborne <[email protected]> wrote:
>
>>
>> On 25/10/16 16:50, kumar rohit wrote:
>>
>>> The query has no longer error message but it does not give me the result
>>> either. The problem is in filter part because it works for the whole
>>> domain
>>> when I remove the keyword Filter, but it does not filter the result.
>>>
>> Lorenz explained how to debug the query - print the complete string out
>> after it is constructed in Java.  Then you can use the error message to
>> find where the parser is pointing to.
>>
>>> Encountered " "(" "( "" at line 1, column 221.
>> It is better if you put some newlines in the query because the errors
>> messages are better.  Or count 221 columns of line 1.
>>
>>         Andy
>>
>>
>>
>>> On Sat, Oct 22, 2016 at 10:41 PM, Andy Seaborne <[email protected]> wrote:
>>>
>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

Reply via email to