# FROM '{join ...}' brackets in SQL binding query

**URL:** <https://forum.inductiveautomation.com/t/from-join-brackets-in-sql-binding-query/5701>\
**Category:** Ignition\
**Created:** [January 18, 2013, 7:11pm UTC](https://forum.inductiveautomation.com/t/from-join-brackets-in-sql-binding-query/5701 "2013-01-18T19:11:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![markdobtech](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@markdobtech](https://forum.inductiveautomation.com/u/markdobtech)\
**Post date:** [January 18, 2013, 7:11pm UTC](https://forum.inductiveautomation.com/t/from-join-brackets-in-sql-binding-query/5701/1 "2013-01-18T19:11:16Z")

</div>

The following SQL runs fine in the Database Query Browser but will not work as a SQL query binding because of ‘{’ brackets on the join clause. What is the syntax one uses to get around this?

SELECT op\_code\_log.code, b\_codes.the\_type, form\_header.form\_number  
FROM {oj op\_code\_log LEFT OUTER JOIN b\_codes ON op\_code\_log.code = b\_codes.code LEFT OUTER JOIN form\_header ON op\_code\_log.form\_serial\_id = form\_header.form\_serial\_id}

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [January 18, 2013, 7:17pm UTC](https://forum.inductiveautomation.com/t/from-join-brackets-in-sql-binding-query/5701/2 "2013-01-18T19:17:44Z")

</div>

You don’t need the brackets in your query. Just remove them and it should be fine.

---

<div class="post-metadata">

**Author:** ![markdobtech](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@markdobtech](https://forum.inductiveautomation.com/u/markdobtech)\
**Post date:** [January 18, 2013, 7:28pm UTC](https://forum.inductiveautomation.com/t/from-join-brackets-in-sql-binding-query/5701/3 "2013-01-18T19:28:54Z")

</div>

Thanks Travis. I also had to remove the ‘oj’ for it to work.
