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.


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
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

1 Like