cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to create a new label from the output of first cypher query having 2 properties in output?

Hello Team,

Please help by telling me how to create a new label from the output of another query?

Below is my output query:

match (a:EntSrv)-[r:tktSrv]-(b:EntTicket) return b.TT_NUMBER , b.CircuitId

Now create the new label which will have 2 properties mentioned above.

Regards
Akshat

2 REPLIES 2

paulare
Graph Buddy

Hi, could you provide example output, you would want to achieve?
Do you want to create new node with new label or add labels to existing nodes?

Think you should look into usage of some apoc functions
http://neo4j-contrib.github.io/neo4j-apoc-procedures/3.5/nodes-relationships/data-creation/
CALL apoc.create.node(['Label'], {key:value,…​}) create node with dynamic labels
CALL apoc.create.nodes(['Label'], [{key:value,…​}]) create multiple nodes with dynamic labels
CALL apoc.create.addLabels( [node,id,ids,nodes], ['Label',…​]) adds the given labels to the node or nodes

Hello Paul,

I got the solution after doing some workaround.

Thanks a lot for your information and help.

Best Regards
Akshat