# \[IGN-4823\]How to escape {} behaviour in SQL Query binding?

**URL:** <https://forum.inductiveautomation.com/t/ign-4823-how-to-escape-behaviour-in-sql-query-binding/51605>\
**Category:** Ignition\
**Created:** [October 5, 2021, 5:58am UTC](https://forum.inductiveautomation.com/t/ign-4823-how-to-escape-behaviour-in-sql-query-binding/51605 "2021-10-05T05:58:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 5, 2021, 5:58am UTC](https://forum.inductiveautomation.com/t/ign-4823-how-to-escape-behaviour-in-sql-query-binding/51605/1 "2021-10-05T05:58:10Z")

</div>

I have an SQL query where I want to replace stuff in a field’s text with `{1}`, however the query is thinking I have a tag/property called `1` and is then failing to replace it. How can I escape this behaviour? I’ve tried all the usual things like:

```auto
{{1}
\{1}

```

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 5, 2021, 12:17pm UTC](https://forum.inductiveautomation.com/t/ign-4823-how-to-escape-behaviour-in-sql-query-binding/51605/2 "2021-10-05T12:17:42Z")

</div>

What have you tried, will this work…

```auto
query = '''
		SELECT .... {0}.....{1)
		
	    '''.format(x1,x2)

```

Edit, I believe I misunderstood your question, but I’ll leave the post anyways.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 5, 2021, 2:25pm UTC](https://forum.inductiveautomation.com/t/ign-4823-how-to-escape-behaviour-in-sql-query-binding/51605/3 "2021-10-05T14:25:38Z")

</div>

This is unfortunately impossible (directly). Could you put the curly braces you need in a custom property, then reference that custom property as a property reference in the query?

I did kick the old ticket I filed back in my support days for this, which might help a bit…

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 5, 2021, 4:16pm UTC](https://forum.inductiveautomation.com/t/ign-4823-how-to-escape-behaviour-in-sql-query-binding/51605/4 "2021-10-05T16:16:01Z")

</div>

I ended up just using square brackets instead. I didn’t really need to use braces, I just wanted to use familiar syntax e.g. as in indirect tag bindings.

Also, i must have rushed that post as I should have included an example query… It seems you understood it though, but here anyway:

```auto
SELECT REPLACE(field_name, 'thing', '{1}')
FROM table

```
