DELETE EDGE #11:0
DELETE EDGE WHERE @rid IN (SELECT FROM #11:0)
DELETE EDGE E WHERE @rid IN (SELECT FROM #11:0)
DELETE EDGE FROM (SELECT FROM #11:0)
Cannot retrieve a vertex with the RID #11:0 because it is an edge
I think the documentation is currently misleading but not wrong.
When you know the rid of the edge, the simplest syntax is:
DELETE EDGE #11:0
But the following two statements will also work:
DELETE EDGE WHERE @rid IN (SELECT FROM #11:0)
DELETE EDGE E WHERE @rid IN (SELECT FROM #11:0)
And the following will not b/c it's the record reference in the FROM should be a vertex not an edge:
DELETE EDGE FROM (SELECT FROM #11:0)
Cannot retrieve a vertex with the RID #11:0 because it is an edge
But the documentation on http://orientdb.com/docs/master/SQL-Delete-Edge.html is referring to subqueries so the example may not be the best to illustrate the point.
In any case, I suggest that you open an issue in the git documentation project:
https://github.com/orientechnologies/orientdb-docs/issues
and make sure you mention the version of OrientDB that you are using, reference the link to the documentation, what it says, and what you think it should say.
On Friday, August 26, 2016 at 2:26:41 AM UTC-4, hartmut bischoff wrote:Deleting Edges from a Sub-queryConsider a situation where you have an edge with a Record ID of #11:0 that you want to delete. In attempting to do so, you run the following query:orientdb> DELETE EDGE FROM (SELECT FROM #11:0)(...)SyntaxDELETE EDGE( <rid>|[<rid> (, <rid>)*](...)If I want to delete the Edge #11:0, I runDELETE EDGE #11:0The documentation tells me to useDELETE EDGE E WHERE @rid IN (SELECT FROM #11:0)instead
--
---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.