Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-17-2019 03:18 PM
I have the following query
MATCH p=(a:Ne{Entity_ID:"365::RKE6110"})-[r:ROUTE*1..20]-(z:Ne{Entity_ID:"267::FTWAYNE6110"})
WHERE all(x IN relationships(p) WHERE (type(x) = "ROUTE" and x.Route_Type = "OPT" and x.Route_Rate="OC3"))
WITH p
with (reduce(result = "", x in filter(con in relationships(p) where type(con)="ROUTE" and con.Route_Type = "OPT" and con.Route_Rate="OC3" and not exists(con.Derived)) | result + x.Route_ID + "," + x.Route_Rate + "," + x.Route_AENDNEID + "," + x.Route_ZENDNEID + "~~~~~")) as paths
return paths
it returns the following:
""
"267::FTWAYNE6110::1::5::3-387::INSPYRUNSUB-FOT110::1::5::2,OC3,387::INSPYRUNSUB-FOT110,267::FTWAYNE6110~~~~~294::INDUSTRIAL6110::1::5::2-387::INSPYRUNSUB-FOT110::1::5::1,OC3,387::INSPYRUNSUB-FOT110,294::INDUSTRIAL6110~~~~~294::INDUSTRIAL6110::1::5::1-311::LINCOLN6110::1::5::3,OC3,311::LINCOLN6110,294::INDUSTRIAL6110~~~~~267::FTWAYNE6110::1::5::2-311::LINCOLN6110::1::5::1,OC3,311::LINCOLN6110,267::FTWAYNE6110~~~~~"
"267::FTWAYNE6110::1::5::2-311::LINCOLN6110::1::5::1,OC3,311::LINCOLN6110,267::FTWAYNE6110~~~~~294::INDUSTRIAL6110::1::5::1-311::LINCOLN6110::1::5::3,OC3,311::LINCOLN6110,294::INDUSTRIAL6110~~~~~294::INDUSTRIAL6110::1::5::2-387::INSPYRUNSUB-FOT110::1::5::1,OC3,387::INSPYRUNSUB-FOT110,294::INDUSTRIAL6110~~~~~267::FTWAYNE6110::1::5::3-387::INSPYRUNSUB-FOT110::1::5::2,OC3,387::INSPYRUNSUB-FOT110,267::FTWAYNE6110~~~~~"
How can I
Thanks
Solved! Go to Solution.
04-23-2019 06:51 AM
At the end of your query, try replacing RETURN paths
with:
WITH paths WHERE paths <> ''
RETURN paths
04-23-2019 06:51 AM
At the end of your query, try replacing RETURN paths
with:
WITH paths WHERE paths <> ''
RETURN paths
All the sessions of the conference are now available online