neo4j 移除标签,无效的输入 –

huangapple go评论74阅读模式
英文:

neo4j remove labels , invalid input -

问题

在neo4j浏览器中,我尝试执行以下命令:

match(n:DATA_CATEGORY_TYPE) remove n:client-18d1b5fb-c7b5-4769-9b75-363ec596b012 return n

我收到以下错误信息:

Invalid input '-' : expected
','
'CALL'
'CREATE'
'DELETE'
'DETACH'
'FOREACH'
'LOAD'
'MATCH'
'MERGE'
'OPTIONAL'
'REMOVE'
'RETURN'
'SET'
'UNION'
'UNWIND'
'USE'
'WITH'
<EOF> (line 1, column 44 (offset: 43))
"match(n:DATA_CATEGORY_TYPE) remove n:client-18d1b5fb-c7b5-4769-9b75-363ec596b012 return n"

标签中的“-”使用有问题,但无法更改它。如何处理这个错误?

英文:

In the neo4j browser i try to execute the following command:

match(n:DATA_CATEGORY_TYPE) remove n:client-18d1b5fb-c7b5-4769-9b75-363ec596b012 return n

I get the following error:

    Invalid input &#39;-&#39;: expected
  &quot;,&quot;
  &quot;CALL&quot;
  &quot;CREATE&quot;
  &quot;DELETE&quot;
  &quot;DETACH&quot;
  &quot;FOREACH&quot;
  &quot;LOAD&quot;
  &quot;MATCH&quot;
  &quot;MERGE&quot;
  &quot;OPTIONAL&quot;
  &quot;REMOVE&quot;
  &quot;RETURN&quot;
  &quot;SET&quot;
  &quot;UNION&quot;
  &quot;UNWIND&quot;
  &quot;USE&quot;
  &quot;WITH&quot;
  &lt;EOF&gt; (line 1, column 44 (offset: 43))
&quot;match(n:DATA_CATEGORY_TYPE) remove n:client-18d1b5fb-c7b5-4769-9b75-363ec596b012 return n&quot;

Something is wrong with the use of "-" in the label, but cannot change it. How can i deal with this error?

答案1

得分: 2

使用反引号 ` 来标记标签,如下所示,

match(n:DATA_CATEGORY_TYPE) remove n:`client-18d1b5fb-c7b5-4769-9b75-363ec596b012` return n
英文:

Use back-ticks ` for the labels, like so,

match(n:DATA_CATEGORY_TYPE) remove n:`client-18d1b5fb-c7b5-4769-9b75-363ec596b012` return n

huangapple
  • 本文由 发表于 2023年4月13日 23:14:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76007106.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定