英文:
Invalid input error in Neo4j cypher query
问题
在Neo4j Cypher查询中出现无效输入错误
MATCH (n:CriticalAsset) WHERE n.name STARTS WITH 'Highly Confidential Data Type' RETURN n
我收到了无效输入错误。字段和属性都是正确的。
下面的图片将帮助你了解节点的情况。
感谢你的帮助来找出错误。
错误消息供参考:
无效输入' ': 预期标识符字符、'.'、空格、'('、节点标签或关系类型、'['、'^'、'*'、'/'、'%'、'+'、'-'、'=~'、IN、STARTS、ENDS、CONTAINS、IS、'='、'!='、'<'、'>'、'<='、'>='、AND、XOR、OR、USE GRAPH、LOAD CSV、START、MATCH、UNWIND、MERGE、CREATE UNIQUE、CREATE、SET、DELETE、REMOVE、FOREACH、WITH、CALL、RETURN、UNION、';' 或输入结束 (第1行,第38列 (偏移量:37))
"MATCH (n:CriticalAssets) WHERE n.name contains 'Highly Confidential Data Type' RETURN n"
英文:
Invalid input error in Neo4j cypher query
MATCH (n:CriticalAsset) where n.name starts with 'Highly Confidential Data Type' RETURN n
I am getting invalid input error.Fields and attributes are correct.
Below picture, will gives you an idea about the node
Appreciate your help to identify the mistake.
Error message for your reference:
Invalid input ' ': expected an identifier character, '.', whitespace, '(', node labels or rel types, '[', '^', '*', '/', '%', '+', '-', "=~", IN, STARTS, ENDS, CONTAINS, IS, '=', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, USE GRAPH, LOAD CSV, START, MATCH, UNWIND, MERGE, CREATE UNIQUE, CREATE, SET, DELETE, REMOVE, FOREACH, WITH, CALL, RETURN, UNION, ';' or end of input (line 1, column 38 (offset: 37))
"MATCH (n:CriticalAssets) where n.name contains 'Highly Confidential Data Type' RETURN n"
答案1
得分: 1
有时问题与缩进有关。您尝试过手动输入Cypher查询吗?这可能有助于解决问题,因为您的语法和查询似乎是正确的。
英文:
Sometime the issue is related to indentation. Have you tried to input the cypher query manually, which might helps to solve as your syntax and query seems correct.
答案2
得分: 0
Put name
within backticks
将 name
放在反引号内
MATCH (n:CriticalAsset) where n.name
starts with 'Highly Confidential Data Type' RETURN n
在节点标签和属性中,反引号用于忽略特殊字符和空格。很可能 name
包含特殊字符或空格。可能需要检查是否意图如此。
英文:
Put name
within backticks
MATCH (n:CriticalAsset) where n.`name` starts with 'Highly Confidential Data Type' RETURN n
Backticks are used to ignore special characters and spaces in node labels and properties. It is likely that name
has some special character or a space. It might be worth checking whether you intend name
to be that way
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论