我在SPARQL中的concat
收到错误消息(Netbeans中的Servlet)。你能建议任何解决这个问题的方法吗?
PREFIX table:<http://www.daltons.com#>
SELECT ?name
WHERE{
?Author table:hasFirstName ?FN.
?Author table:hasLastName ?LN.
bind (concat(str(?FN),str(?LN)) as ?name)
}
第1行第132栏的词汇错误。遇到:“(”(40),之后: “绑定”
答案 0 :(得分:0)
"PREFIX table:<http://www.example.com#>"
+"SELECT "
+ "(CONCAT(?FN, \" \",COALESCE(?MD,\"\"),\" \", ?LN) AS ?name)"
+"WHERE{"
+"?Author table:hasFirstName ?FN. "
+"OPTIONAL{?Author table:hasMiddleName ?MD}."
+"?Author table:hasLastName ?LN} ";
Finally found the right answer with this code and used 2.8.8 version arq of jena . Thanks for your interest and suggestions.