# Add SQL info to PLC

**URL:** <https://forum.inductiveautomation.com/t/add-sql-info-to-plc/41391>\
**Category:** Ignition\
**Created:** [December 10, 2020, 3:23pm UTC](https://forum.inductiveautomation.com/t/add-sql-info-to-plc/41391 "2020-12-10T15:23:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![toddayers](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@toddayers](https://forum.inductiveautomation.com/u/toddayers)\
**Post date:** [December 10, 2020, 3:23pm UTC](https://forum.inductiveautomation.com/t/add-sql-info-to-plc/41391/1 "2020-12-10T15:23:17Z")

</div>

I am needing to be able to scan a work order number using ignition, and have ignition query a table in SQL and retrieve the rows of information associated with that number, whether it be 4 rows or 10 rows of data and then insert that info into a data array within a PLC. Is this possible?

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [December 10, 2020, 3:28pm UTC](https://forum.inductiveautomation.com/t/add-sql-info-to-plc/41391/2 "2020-12-10T15:28:21Z")

</div>

It sure is. You can do this with transaction groups or just scripts. If you supply more info. Someone around here can help you.

---

<div class="post-metadata">

**Author:** ![toddayers](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@toddayers](https://forum.inductiveautomation.com/u/toddayers)\
**Post date:** [December 10, 2020, 3:39pm UTC](https://forum.inductiveautomation.com/t/add-sql-info-to-plc/41391/3 "2020-12-10T15:39:34Z")

</div>

I have a project where I can scan a upc code that is a work order number and it is linked to a tag in my project called WorkOrderNumberToSQL, the number populates in the value of the tag in the tag browser but I don’t know where to go from here…

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 10, 2020, 3:52pm UTC](https://forum.inductiveautomation.com/t/add-sql-info-to-plc/41391/4 "2020-12-10T15:52:54Z")

</div>

Have you followed any of the barcode scanning topics to get the first part working? If you get the scan-query steps working to display in a table for an operator, it is relatively easy to script writing to the PLC (show your PLC address/datatype details). I’d recommend putting the script on a button so the operator can review the query results before sending to the PLC.
