# Escape characters in String in cypher statement

**URL:** https://community.neo4j.com/t/escape-characters-in-string-in-cypher-statement/38519
**Category:** Cypher
**Created:** [May 18, 2021, 1:27pm UTC](https://community.neo4j.com/t/escape-characters-in-string-in-cypher-statement/38519 "2021-05-18T13:27:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nitinjkt](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/nitinjkt/32/17914_2.png) [@nitinjkt](https://community.neo4j.com/u/nitinjkt)
#### Post date: [May 18, 2021, 1:27pm UTC](https://community.neo4j.com/t/escape-characters-in-string-in-cypher-statement/38519/1 "2021-05-18T13:27:37Z")

</div>

Dear Team,

I am facing some challenges while trying to call multiple apoc procedure within one another.

call apoc.custom.asProcedure('RIL\_ODU\_PATH\_TERMINATION\_V1',  
'call apoc.bolt.execute("bolt://user:password@10.144.97.90:7070",  
"match (a:inventoryObjects{type : $param11})-[r:INSTANCE\_OF]-\>(c:classes{name:'gPath'})  
where ((a.name = $param22 and $param22 is not null) or (1=1 and $param22 is null))  
with a  
optional match (b:inventoryObjects{site\_inst\_id : a.a\_side\_site\_id})-[r:INSTANCE\_OF]-\>(c:classes{name : 'gFacility'})  
with a,b  
optional match (d:inventoryObjects{site\_inst\_id : a.z\_side\_site\_id})-[r:INSTANCE\_OF]-\>(c:classes{name : 'gFacility'})  
with a,b,d  
CALL apoc.cypher.run(  
"call custom.path\_element\_v('gPath' ,'"+ a.name +"') yield path\_element\_parent\_equip as path\_element\_parent\_equip,  
path\_element\_equip as path\_element\_equip,path\_element\_shelf as path\_element\_shelf,  
path\_element\_par\_slot as path\_element\_par\_slot,path\_element\_par\_card as path\_element\_par\_card,path\_element\_child\_slot as path\_element\_child\_slot,  
path\_element\_child\_card as path\_element\_child\_card,path\_element\_port as path\_element\_port,path\_element\_port\_name as path\_element\_port\_name,  
path\_pkey as path\_pkey,path\_element\_no as path\_element\_no  
RETURN path\_element\_parent\_equip as path\_a\_equip\_slte,path\_element\_equip as path\_a\_equipment, path\_element\_shelf as path\_a\_shelf,  
path\_element\_par\_slot as path\_a\_par\_slot,path\_element\_par\_card as path\_a\_par\_card,path\_element\_child\_slot as path\_a\_child\_slot,  
path\_element\_child\_card as path\_a\_child\_card,path\_element\_port as path\_a\_port,path\_element\_port\_name as path\_a\_equip\_to\_port  
ORDER BY path\_element\_no ASC  
LIMIT 1",{}  
) yield value  
CALL apoc.cypher.run(  
"call custom.path\_element\_v('gPath' ,'"+ a.name +"') yield path\_element\_parent\_equip as path\_element\_parent\_equip,  
path\_element\_equip as path\_element\_equip,path\_element\_shelf as path\_element\_shelf,  
path\_element\_par\_slot as path\_element\_par\_slot,path\_element\_par\_card as path\_element\_par\_card,path\_element\_child\_slot as path\_element\_child\_slot,  
path\_element\_child\_card as path\_element\_child\_card,path\_element\_port as path\_element\_port,path\_element\_port\_name as path\_element\_port\_name,  
path\_pkey as path\_pkey,path\_element\_no as path\_element\_no  
RETURN path\_element\_parent\_equip as path\_z\_equip\_slte,path\_element\_equip as path\_z\_equipment, path\_element\_shelf as path\_z\_shelf,  
path\_element\_par\_slot as path\_z\_par\_slot,path\_element\_par\_card as path\_z\_par\_card,path\_element\_child\_slot as path\_z\_child\_slot,  
path\_element\_child\_card as path\_z\_child\_card,path\_element\_port as path\_z\_port,path\_element\_port\_name as path\_z\_equip\_to\_port  
ORDER BY path\_element\_no DESC  
LIMIT 1",{}  
) yield value as value1  
return a.name AS path\_name,  
a.type AS path\_type,  
a.status AS path\_status,  
a.bandwidth AS path\_bandwidth,  
b.name AS path\_aside\_site,  
d.name AS path\_zside\_site,  
value.path\_a\_equip\_slte as path\_a\_equip\_slte,  
value1.path\_z\_equip\_slte as path\_z\_equip\_slte,  
value.path\_a\_equipment as path\_a\_equipment,  
value1.path\_z\_equipment as path\_z\_equipment,  
value.path\_a\_shelf as path\_a\_shelf,  
value1.path\_z\_shelf as path\_z\_shelf,  
value.path\_a\_par\_slot as path\_a\_par\_slot,  
value1.path\_z\_par\_slot as path\_z\_par\_slot,  
value.path\_a\_par\_card as path\_a\_par\_card,  
value1.path\_z\_par\_card as path\_z\_par\_card,  
value.path\_a\_child\_slot as path\_a\_child\_slot,  
value1.path\_z\_child\_slot as path\_z\_child\_slot,  
value.path\_a\_child\_card as path\_a\_child\_card,  
value1.path\_z\_child\_card as path\_z\_child\_card,  
value.path\_a\_port as path\_a\_port,  
value1.path\_z\_port as path\_z\_port,  
value.path\_a\_equip\_to\_port as path\_a\_equip\_to\_port,  
value1.path\_z\_equip\_to\_port as path\_z\_equip\_to\_port", {param11:$param ,param22:$param2},{virtual:true}) yield row  
with row as map return apoc.map.get(map,"path\_name") as path\_name ,  
apoc.map.get(map,"path\_type") as path\_type ,  
apoc.map.get(map,"path\_status") as path\_status ,  
apoc.map.get(map,"path\_bandwidth") as path\_bandwidth ,  
apoc.map.get(map,"path\_aside\_site") as path\_aside\_site ,  
apoc.map.get(map,"path\_zside\_site") as path\_zside\_site ,  
apoc.map.get(map,"path\_a\_equip\_slte") as path\_a\_equip\_slte ,  
apoc.map.get(map,"path\_z\_equip\_slte") as path\_z\_equip\_slte ,  
apoc.map.get(map,"path\_a\_shelf") as path\_a\_shelf ,  
apoc.map.get(map,"path\_z\_shelf") as path\_z\_shelf ,  
apoc.map.get(map,"path\_a\_par\_slot") as path\_a\_par\_slot ,  
apoc.map.get(map,"path\_z\_par\_slot") as path\_z\_par\_slot ,  
apoc.map.get(map,"path\_a\_par\_card") as path\_a\_par\_card ,  
apoc.map.get(map,"path\_z\_par\_card") as path\_z\_par\_card ,  
apoc.map.get(map,"path\_a\_child\_slot") as path\_a\_child\_slot ,  
apoc.map.get(map,"path\_z\_child\_slot") as path\_z\_child\_slot ,  
apoc.map.get(map,"path\_a\_child\_card") as path\_a\_child\_card ,  
apoc.map.get(map,"path\_z\_child\_card") as path\_z\_child\_card ,  
apoc.map.get(map,"path\_z\_port") as path\_a\_port ,  
apoc.map.get(map,"path\_z\_port") as path\_z\_port ,  
apoc.map.get(map,"path\_a\_equip\_to\_port") as path\_a\_equip\_to\_port ,  
apoc.map.get(map,"path\_z\_equip\_to\_port") as path\_z\_equip\_to\_port  
',  
'read',[['path\_name','String'],['path\_type','String'],['path\_status','String'],['path\_bandwidth','String'],['path\_aside\_site','String'],  
['path\_zside\_site','String'],['path\_a\_equip\_slte','String'],['path\_z\_equip\_slte','String'],['path\_a\_shelf','String'],['path\_z\_shelf','String'],  
['path\_a\_par\_slot','String'],['path\_z\_par\_slot','String'],['path\_a\_par\_card','String'],['path\_z\_par\_card','String'],['path\_a\_child\_slot','String'],  
['path\_z\_child\_slot','String'],['path\_a\_child\_card','String'],['path\_z\_child\_card','String'],['path\_a\_port','String'],['path\_z\_port','String'],  
['path\_a\_equip\_to\_port','String'],['path\_z\_equip\_to\_port','String']],[['param','String'],['param2','String']],'ODU Path Termination');

while i am executing above statement, custom procedure is created but when i executed this procedure by using statement  
call custom.RIL\_ODU\_PATH\_TERMINATION\_V1('ODU',null)

Its showing error as

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/6/c/6c5b57fe8e30c0165a7d4f2547cc6d4db9fcaa99.png)

I understnad its string concatenation or escaping character but not able to resolve it.

It would be grateful If any one can help to resolve this issue.
